/* CRM workspace reskin — Twenty-style light UI.
   Scoped to the shared admin shell hooks the JS renders. Selectors and
   data-* hooks are unchanged; only presentation is adjusted. */
#crmWorkspaceRoot {
  --crm-ink: #333333;
  --crm-muted: #666666;
  --crm-faint: #999999;
  --crm-xlight: #b3b3b3;
  --crm-line: #f1f1f1;
  --crm-line-med: #ebebeb;
  --crm-line-strong: #d6d6d6;
  --crm-bg: #ffffff;
  --crm-subtle: #fcfcfc;
  --crm-hover: #f5f5f5;
  --crm-accent: #3c63de;
  --crm-accent-hover: #2f58d5;
  --crm-accent-ink: #375bc9;
  --crm-accent-soft: #eef2fe;
  --crm-accent-border: #adbff9;
  --crm-warning: #b45309;
  --crm-danger: #e6474c;
  --crm-danger-soft: #fdecec;
  --crm-purple: #6d54c9;
  --crm-radius-sm: 4px;
  --crm-radius: 8px;
  --crm-shadow-light: 0 2px 4px rgba(0,0,0,.04), 0 0 4px rgba(0,0,0,.08);
  --crm-shadow-strong: 2px 4px 16px rgba(0,0,0,.16), 0 2px 4px rgba(0,0,0,.08);
  --crm-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-family: var(--crm-font);
  color: var(--crm-ink);
  min-width: 0;
}
#crm.crm-workspace-active > :not(#crmWorkspaceRoot) { display: none !important; }

.crm-ws {
  min-height: 0;
  height: 100%;
  background: var(--crm-bg);
  border: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}
.crm-ws * { box-sizing: border-box; }
.crm-ws button,
.crm-ws input,
.crm-ws select,
.crm-ws textarea { font: inherit; }
.crm-ws button { width: auto; margin: 0; }
.crm-ws button:focus-visible,
.crm-ws input:focus-visible,
.crm-ws select:focus-visible,
.crm-ws textarea:focus-visible,
.crm-ws [tabindex]:focus-visible {
  outline: 2px solid rgba(60, 99, 222, .35);
  outline-offset: 2px;
}
.crm-ws-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--crm-radius-sm);
  background: var(--crm-accent);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
}
.crm-ws-btn:hover { background: var(--crm-accent-hover); }
.crm-ws-btn.secondary { background: #fff; border-color: var(--crm-line-med); color: var(--crm-ink); }
.crm-ws-btn.secondary:hover { background: var(--crm-hover); }
.crm-ws-btn.quiet { background: transparent; border-color: transparent; color: var(--crm-muted); }
.crm-ws-btn.quiet:hover { background: var(--crm-hover); color: var(--crm-ink); }
.crm-ws-btn.danger { background: #fff; border-color: #fbd5d5; color: var(--crm-danger); }
.crm-ws-btn.danger:hover { background: var(--crm-danger-soft); }
.crm-ws-btn:disabled { cursor: wait; opacity: .55; }
.crm-ws-kbd {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 5px;
  border: 1px solid var(--crm-line-med);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--crm-muted);
  background: #fff;
  font-size: 11px;
  font-weight: 600;
}
.crm-ws-toolbar-label { color: var(--crm-muted); font-size: 12px; white-space: nowrap; }
.crm-ws-view-actions { display: flex; gap: .22rem; }
.crm-ws-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--crm-line-med);
  border-radius: var(--crm-radius-sm);
  background: #fff;
  color: var(--crm-muted);
  cursor: pointer;
}
.crm-ws-icon-btn:hover,
.crm-ws-icon-btn[aria-pressed="true"] { background: var(--crm-accent-soft); border-color: var(--crm-accent-border); color: var(--crm-accent-ink); }
.crm-ws-status {
  margin: 0 0 .85rem;
  padding: .6rem .75rem;
  border: 1px solid #fbd5d5;
  border-radius: var(--crm-radius-sm);
  background: var(--crm-danger-soft);
  color: var(--crm-danger);
  font-size: 13px;
}
.crm-ws-status[hidden] { display: none; }
.crm-ws-loading { color: var(--crm-muted); font-size: 13px; padding: 2rem .5rem; text-align: center; }
.crm-ws-empty {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 1.5rem;
  border: 1px dashed var(--crm-line-strong);
  border-radius: var(--crm-radius);
  color: var(--crm-muted);
  text-align: center;
}
.crm-ws-empty strong { display: block; color: var(--crm-ink); font-size: 14px; font-weight: 600; margin-bottom: .3rem; }
.crm-ws-empty p { margin: 0 0 .8rem; font-size: 13px; }
.crm-ws-load-more { display: flex; justify-content: center; padding: .75rem 0 1.25rem; }
.crm-ws-table-wrap { overflow-x: auto; border: 1px solid var(--crm-line); border-radius: var(--crm-radius); }
.crm-ws-table {
  width: 100%;
  min-width: 680px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  border-collapse: collapse;
}
.crm-ws-table th,
.crm-ws-table td { padding: .5rem .68rem; border-bottom: 1px solid var(--crm-line); font-size: 13px; vertical-align: middle; }
.crm-ws-table th { background: var(--crm-subtle); color: var(--crm-faint); font-size: 12px; font-weight: 500; white-space: nowrap; }
.crm-ws-table tr:last-child td { border-bottom: 0; }
.crm-ws-table tbody tr:hover { background: var(--crm-subtle); }
.crm-ws-formula { font-variant-numeric: tabular-nums; color: var(--crm-ink); }
.crm-ws-link {
  border: 0 !important;
  background: transparent !important;
  color: var(--crm-ink) !important;
  cursor: pointer;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: .1rem 0 !important;
  text-align: left;
}
.crm-ws-link:hover { color: var(--crm-accent) !important; }
.crm-ws-subline { display: block; color: var(--crm-faint); font-size: 11px; margin-top: .15rem; }
.crm-ws-tags { display: flex; flex-wrap: wrap; gap: .22rem; }
.crm-ws-tag,
.crm-ws-stage,
.crm-ws-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f4f4f4;
  color: var(--crm-muted);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.crm-ws-stage-new { background: var(--crm-accent-soft); color: var(--crm-accent-ink); }
.crm-ws-stage-qualified { background: #e8f5ee; color: #177f5c; }
.crm-ws-stage-proposal { background: #f1ecfe; color: #6d54c9; }
.crm-ws-stage-won { background: #dcf3ea; color: #0f7a5f; }
.crm-ws-stage-lost { background: var(--crm-danger-soft); color: #c93a3e; }
.crm-ws-status-open { background: var(--crm-accent-soft); color: var(--crm-accent-ink); }
.crm-ws-status-done { background: #dcf3ea; color: #0f7a5f; }
.crm-ws-overdue { color: var(--crm-danger); font-weight: 600; }
.crm-ws-actions { display: flex; align-items: center; gap: .25rem; white-space: nowrap; }
.crm-ws-actions .crm-ws-btn { min-height: 24px; padding: 0 8px; font-size: 12px; }
.crm-ws-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 0;
  margin-bottom: .9rem;
  border: 1px solid var(--crm-line);
  border-radius: var(--crm-radius);
  overflow: hidden;
}
.crm-ws-metric { padding: .72rem .75rem; border-right: 1px solid var(--crm-line); background: #fff; }
.crm-ws-metric:last-child { border-right: 0; }
.crm-ws-metric-label { display: block; color: var(--crm-faint); font-size: 11px; font-weight: 500; }
.crm-ws-metric-value { display: block; margin-top: .2rem; color: var(--crm-ink); font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; }
.crm-ws-overview-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .85fr); gap: .9rem; }
.crm-ws-panel { min-width: 0; border: 1px solid var(--crm-line); border-radius: var(--crm-radius); background: #fff; }
.crm-ws-panel-header { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .72rem .8rem; border-bottom: 1px solid var(--crm-line); }
.crm-ws-panel-header h3 { margin: 0; color: var(--crm-ink); font-size: 13px; font-weight: 600; }
.crm-ws-panel-header span { color: var(--crm-faint); font-size: 11px; }
.crm-ws-panel-body { padding: .72rem .8rem; }
.crm-ws-bars { display: grid; gap: .55rem; }
.crm-ws-bar-row { display: grid; grid-template-columns: 82px 1fr 44px; align-items: center; gap: .45rem; font-size: 12px; }
.crm-ws-bar-row > span:first-child { color: var(--crm-muted); text-transform: capitalize; }
.crm-ws-bar { height: 6px; border-radius: 999px; background: var(--crm-line); overflow: hidden; }
.crm-ws-bar i { display: block; height: 100%; border-radius: inherit; background: var(--crm-accent); }
.crm-ws-bar-row > strong { text-align: right; font-size: 12px; font-weight: 500; }
.crm-ws-task-list { display: grid; gap: .45rem; }
.crm-ws-task-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--crm-line); }
.crm-ws-task-row:last-child { border-bottom: 0; }
.crm-ws-task-main { min-width: 0; }
.crm-ws-task-main strong { display: block; overflow: hidden; color: var(--crm-ink); font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.crm-ws-task-main span { display: block; margin-top: .13rem; color: var(--crm-faint); font-size: 11px; }
.crm-ws-board-wrap { overflow-x: auto; padding-bottom: .35rem; }
.crm-ws-board { display: grid; grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: 12px; min-width: 1000px; }
.crm-ws-column { min-height: 300px; border: 1px solid var(--crm-line); border-radius: var(--crm-radius); background: var(--crm-subtle); }
.crm-ws-column-header { display: flex; justify-content: space-between; padding: .62rem .65rem; border-bottom: 1px solid var(--crm-line); font-size: 12px; font-weight: 600; text-transform: capitalize; }
.crm-ws-column-body { display: grid; gap: 8px; padding: 8px; }
.crm-ws-deal-card { padding: .62rem; border: 1px solid var(--crm-line-med); border-radius: 6px; background: #fff; box-shadow: var(--crm-shadow-light); transition: border-color .12s ease, box-shadow .12s ease; }
.crm-ws-deal-card:hover { border-color: var(--crm-line-strong); box-shadow: 0 1px 4px rgba(0, 0, 0, .10); }
.crm-ws-deal-card strong { display: block; font-size: 13px; font-weight: 500; }
.crm-ws-deal-card .crm-ws-link { display: block; width: 100%; font-size: 13px !important; font-weight: 500 !important; text-align: left; }
.crm-ws-deal-card p { margin: .25rem 0 0; color: var(--crm-muted); font-size: 11px; }
.crm-ws-deal-card .crm-ws-card-amount { margin-top: .5rem; color: var(--crm-ink); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.crm-ws-deal-card .crm-ws-actions .crm-ws-select { width: 100%; }
#crmWorkspaceRoot .crm-ws-column-header { align-items: center; }

.crm-ws-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  background: rgba(0, 0, 0, .32);
}
.crm-ws-drawer[hidden] { display: none; }
.crm-ws-drawer-panel {
  width: min(520px, 100vw);
  height: 100%;
  overflow-y: auto;
  padding: 16px 20px;
  background: #fff;
  border-left: 1px solid var(--crm-line-med);
  box-shadow: -8px 0 24px rgba(0,0,0,.08);
  font-family: var(--crm-font);
}
#crmWorkspaceRoot[data-crm-drawer-size="narrow"] .crm-ws-drawer-panel { width: min(380px, 100vw); }
#crmWorkspaceRoot[data-crm-drawer-size="wide"] .crm-ws-drawer-panel { width: min(720px, 100vw); }
#crmWorkspaceRoot[data-crm-table-density="comfortable"] .crm-ws-table th,
#crmWorkspaceRoot[data-crm-table-density="comfortable"] .crm-ws-table td { height: 36px; padding-top: 7px; padding-bottom: 7px; }
#crmWorkspaceRoot[data-crm-board-density="comfortable"] .crm-ws-board-card,
#crmWorkspaceRoot[data-crm-board-density="comfortable"] .crm-ws-deal-card { padding: .75rem .8rem; }
.crm-ws-drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin: -16px -20px 12px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--crm-line);
  background: #fff;
}
.crm-ws-drawer-head h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.crm-ws-drawer-head p { margin: .22rem 0 0; color: var(--crm-muted); font-size: 12px; }
.crm-ws-drawer-section { padding: .9rem 0; border-bottom: 1px solid var(--crm-line); }
.crm-ws-drawer-section:last-child { border-bottom: 0; }
.crm-ws-drawer-section h4 { margin: 0 0 .55rem; font-size: 12px; font-weight: 600; }
.crm-ws-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.crm-ws-field { display: grid; gap: .25rem; }
.crm-ws-field.full { grid-column: 1 / -1; }
.crm-ws-field span { color: var(--crm-muted); font-size: 11px; font-weight: 500; }
.crm-ws-field input,
.crm-ws-field select,
.crm-ws-field textarea,
.crm-ws-dialog input,
.crm-ws-dialog select,
.crm-ws-dialog textarea { width: 100%; margin: 0 !important; padding: 6px 8px !important; border: 1px solid var(--crm-line-med) !important; border-radius: var(--crm-radius-sm) !important; background: #fff !important; color: var(--crm-ink); font-size: 13px !important; }
.crm-ws-field input:focus,
.crm-ws-field select:focus,
.crm-ws-field textarea:focus,
.crm-ws-dialog input:focus,
.crm-ws-dialog select:focus,
.crm-ws-dialog textarea:focus { border-color: var(--crm-accent) !important; outline: none !important; box-shadow: 0 0 0 3px var(--crm-accent-soft) !important; }
.crm-ws-field textarea, .crm-ws-dialog textarea { min-height: 76px; resize: vertical; }
.crm-ws-detail-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; }
.crm-ws-note-list, .crm-ws-timeline { display: grid; gap: .45rem; }
.crm-ws-note, .crm-ws-event { padding: .55rem .6rem; border: 1px solid var(--crm-line); border-radius: 6px; background: var(--crm-subtle); }
.crm-ws-note p, .crm-ws-event p { margin: 0; white-space: pre-wrap; color: var(--crm-ink); font-size: 13px; line-height: 1.45; }
.crm-ws-note small, .crm-ws-event small { display: block; margin-top: .25rem; color: var(--crm-faint); font-size: 11px; }
.crm-ws-related-list { display: grid; gap: .35rem; }
.crm-ws-related-row { display: flex; align-items: center; justify-content: space-between; gap: .55rem; margin: 0 -.35rem; padding: .45rem .35rem; border-bottom: 1px solid var(--crm-line); border-radius: 4px; }
.crm-ws-related-row:hover { background: var(--crm-hover); }
.crm-ws-related-row:last-child { border-bottom: 0; }
.crm-ws-related-row strong { font-size: 13px; font-weight: 500; }
.crm-ws-related-row span { color: var(--crm-muted); font-size: 11px; }
.crm-ws-related-block h4 { margin: .35rem 0 .45rem; font-size: 12px; font-weight: 600; }
.crm-ws-contact-actions .crm-ws-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.crm-ws-contact-actions .crm-ws-btn { min-height: 25px; }
.crm-ws-dispositions { display: flex; flex-wrap: wrap; align-items: center; gap: .28rem; margin-top: .65rem; }
.crm-ws-disposition-label { width: 100%; color: var(--crm-muted); font-size: 11px; }
.crm-ws-disposition { min-height: 24px; padding: 3px 8px; border: 1px solid var(--crm-line-strong); border-radius: 999px; background: #fff; color: var(--crm-muted); cursor: pointer; font-size: 11px; }
.crm-ws-disposition:hover, .crm-ws-disposition.active { border-color: var(--crm-accent-border); background: var(--crm-accent-soft); color: var(--crm-accent-ink); }
.crm-ws-attribution dl { display: grid; gap: .28rem; margin: 0; }
.crm-ws-attribution dl > div { display: grid; grid-template-columns: minmax(100px, 34%) 1fr; gap: .55rem; font-size: 12px; }
.crm-ws-attribution dt { color: var(--crm-muted); }
.crm-ws-attribution dd { margin: 0; overflow-wrap: anywhere; color: var(--crm-ink); }

.crm-ws-dialog {
  width: min(560px, calc(100vw - 2rem));
  max-height: min(760px, calc(100vh - 2rem));
  padding: 0;
  border: 1px solid var(--crm-line-med);
  border-radius: var(--crm-radius);
  box-shadow: var(--crm-shadow-strong);
  color: var(--crm-ink);
  font-family: var(--crm-font);
}
.crm-ws-dialog::backdrop { background: rgba(0, 0, 0, .4); }
.crm-ws-dialog-content { display: grid; gap: 16px; padding: 18px 20px; overflow-y: auto; }
.crm-ws-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .7rem; margin-bottom: -4px; padding-bottom: 12px; border-bottom: 1px solid var(--crm-line); }
.crm-ws-dialog-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.crm-ws-dialog-head p { margin: .2rem 0 0; color: var(--crm-muted); font-size: 12px; }
.crm-ws-dialog-close { width: 28px !important; height: 28px; padding: 0 !important; border: 0 !important; border-radius: var(--crm-radius-sm) !important; background: transparent !important; color: var(--crm-muted) !important; font-size: 1.1rem !important; }
.crm-ws-dialog-close:hover { background: var(--crm-hover) !important; }
.crm-ws-dialog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.crm-ws-dialog-field { display: grid; gap: .25rem; }
.crm-ws-dialog-field.full { grid-column: 1 / -1; }
.crm-ws-dialog-field label { color: var(--crm-muted); font-size: 11px; font-weight: 500; }
.crm-ws-dialog-actions { display: flex; justify-content: flex-end; gap: .4rem; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--crm-line); }
.crm-dedup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.crm-dedup-list li { display: grid; gap: .2rem; padding: .45rem .5rem; border: 1px solid var(--crm-line); border-radius: 6px; font-size: 13px; }
.crm-dedup-preview { margin: 0; color: var(--crm-muted); font-size: 12px; }
.crm-ws-form-error { margin: 0; padding: .5rem .6rem; border-radius: 6px; background: var(--crm-danger-soft); color: var(--crm-danger); font-size: 12px; }
.crm-ws-form-error[hidden] { display: none; }
.crm-ws-command { width: min(620px, calc(100vw - 2rem)); padding: 0; border: 1px solid var(--crm-line-med); border-radius: var(--crm-radius); box-shadow: var(--crm-shadow-strong); font-family: var(--crm-font); }
.crm-ws-command::backdrop { background: rgba(0,0,0,.4); }
.crm-ws-command-search { width: 100%; height: 44px; margin: 0 !important; padding: .7rem .8rem !important; border: 0 !important; border-bottom: 1px solid var(--crm-line) !important; border-radius: 0 !important; font-size: 14px !important; }
.crm-ws-command-list { max-height: 410px; overflow-y: auto; padding: 6px; }
.crm-ws-command-item { display: flex; align-items: center; gap: .6rem; width: 100% !important; padding: 8px 10px !important; border: 0 !important; border-radius: var(--crm-radius-sm) !important; background: transparent !important; color: var(--crm-ink) !important; text-align: left; }
.crm-ws-command-item:hover, .crm-ws-command-item[aria-selected="true"] { background: var(--crm-accent-soft) !important; }
.crm-ws-command-item strong { display: block; font-size: 13px; font-weight: 500; }
.crm-ws-command-item span { display: block; margin-top: .12rem; color: var(--crm-muted); font-size: 11px; }
.crm-ws-command-empty { padding: 1rem; color: var(--crm-muted); font-size: 13px; text-align: center; }
.crm-ws-command-section { padding: .35rem .7rem .15rem; color: var(--crm-faint); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

@media (max-width: 1100px) {
  .crm-ws-metrics { grid-template-columns: repeat(3, 1fr); }
  .crm-ws-metric:nth-child(3) { border-right: 0; }
  .crm-ws-metric:nth-child(-n + 3) { border-bottom: 1px solid var(--crm-line); }
  .crm-ws-overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .crm-ws-metrics { grid-template-columns: repeat(2, 1fr); }
  .crm-ws-metric { border-right: 1px solid var(--crm-line); border-bottom: 1px solid var(--crm-line); }
  .crm-ws-metric:nth-child(2n) { border-right: 0; }
  .crm-ws-metric:nth-last-child(-n + 2) { border-bottom: 0; }
  .crm-ws-detail-grid, .crm-ws-dialog-grid { grid-template-columns: 1fr; }
  .crm-ws-field.full, .crm-ws-dialog-field.full { grid-column: auto; }
  .crm-ws-drawer-panel { padding: .8rem; }
}
@media (max-width: 420px) {
  .crm-ws-toolbar .crm-ws-select { min-width: 0; flex: 1 1 100px; }
  .crm-ws-toolbar-label { display: none; }
  .crm-ws-metric-value { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .crm-ws *, .crm-ws *::before, .crm-ws *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Shared admin shell in Twenty light style: slim gray sidebar + hairline topbar. */
body.crm-workspace-mode {
  --brand: #3c63de;
  --brand-dark: #2f58d5;
  --bg: #ffffff;
  --sidebar: #fcfcfc;
  --line: #f1f1f1;
  --ink: #333333;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #333;
}
body.crm-workspace-mode .app-shell,
.app-shell { grid-template-columns: 232px minmax(0, 1fr); background: #fff; }
.sidebar {
  background: #fcfcfc;
  border-right: 1px solid #f1f1f1;
  padding: 8px;
  gap: 2px;
}
.brand {
  min-height: 32px;
  padding: 4px 8px 10px;
  gap: 8px;
  color: #333;
  font-size: 13px;
  font-weight: 600;
}
.brand-mark {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: #333;
  box-shadow: none;
}
.nav-section {
  padding: 12px 8px 4px;
  color: #999;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .05em;
}
.nav-section.crm-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 27px;
  margin-top: 2px;
  padding: 8px 8px 3px;
  cursor: pointer;
  user-select: none;
}
.nav-section.crm-section-toggle::after {
  content: '⌄';
  color: #b3b3b3;
  font-size: 12px;
  line-height: 1;
  transform: translateY(-1px);
  transition: transform .15s ease;
}
.nav-section.crm-section-toggle[aria-expanded="false"]::after { transform: rotate(-90deg); }
.nav-section.crm-section-toggle:focus-visible {
  outline: 2px solid rgba(60, 99, 222, .35);
  outline-offset: -2px;
  border-radius: 4px;
}
.sidebar .nav-item[hidden],
.sidebar .nav-item.crm-nav-collapsed { display: none !important; }
.nav-item {
  min-height: 28px;
  padding: 4px 8px;
  gap: 8px;
  border-radius: 4px;
  color: #666;
  font-size: 13px;
  font-weight: 500;
}
.nav-item:hover { background: #f5f5f5; color: #333; }
.nav-item.active { background: #f1f1f1; color: #333; }

/* Icon glyphs for the static shell tabs — pure CSS, Twenty icon-bar look. */
.nav-item[data-tab]::before {
  content: '';
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  background: currentColor;
  opacity: .75;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}
.nav-item.crm-object-nav[data-tab]::before,
.nav-item.crm-favorite-item::before,
.nav-item[data-tab][data-settings-hub]::before,
.nav-item[data-tab][data-utr-hub]::before { content: none; }
.nav-item[data-tab="dashboard"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
}
.nav-item[data-tab="inbox"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E");
}
.nav-item[data-tab="crm"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}
.nav-item[data-tab="deals"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8'/%3E%3Cpath d='M12 6v2m0 8v2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8'/%3E%3Cpath d='M12 6v2m0 8v2'/%3E%3C/svg%3E");
}
.nav-item[data-tab="leads"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9.46V19l4 2v-8.54L22 3z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9.46V19l4 2v-8.54L22 3z'/%3E%3C/svg%3E");
}
.nav-item[data-tab="analytics"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M7 15v-4'/%3E%3Cpath d='M11 15V8'/%3E%3Cpath d='M15 15v-6'/%3E%3Cpath d='M19 15v-9'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M7 15v-4'/%3E%3Cpath d='M11 15V8'/%3E%3Cpath d='M15 15v-6'/%3E%3Cpath d='M19 15v-9'/%3E%3C/svg%3E");
}
.nav-item[data-tab="evolution"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'/%3E%3C/svg%3E");
}
.nav-item[data-tab="sms"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
}
.nav-item[data-tab="calls"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}
.nav-item[data-tab="templates"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='7' rx='1'/%3E%3Crect x='3' y='14' width='9' height='7' rx='1'/%3E%3Crect x='16' y='14' width='5' height='7' rx='1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='7' rx='1'/%3E%3Crect x='3' y='14' width='9' height='7' rx='1'/%3E%3Crect x='16' y='14' width='5' height='7' rx='1'/%3E%3C/svg%3E");
}
.nav-item[data-tab="forms"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='M12 11h4M12 16h4M8 11h.01M8 16h.01'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='M12 11h4M12 16h4M8 11h.01M8 16h.01'/%3E%3C/svg%3E");
}
.nav-item[data-tab="broadcast"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 11 18-5v12L3 14v-3z'/%3E%3Cpath d='M11.6 16.8a3 3 0 1 1-5.8-1.6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 11 18-5v12L3 14v-3z'/%3E%3Cpath d='M11.6 16.8a3 3 0 1 1-5.8-1.6'/%3E%3C/svg%3E");
}
.nav-item[data-tab="users"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
}
.nav-item[data-tab="assignments"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 17 2 2 4-4'/%3E%3Cpath d='m3 7 2 2 4-4'/%3E%3Cpath d='M13 6h8M13 12h8M13 18h8'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 17 2 2 4-4'/%3E%3Cpath d='m3 7 2 2 4-4'/%3E%3Cpath d='M13 6h8M13 12h8M13 18h8'/%3E%3C/svg%3E");
}
.nav-item[data-tab="canned"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 3 14h9l-1 8 10-12h-9l1-8z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 3 14h9l-1 8 10-12h-9l1-8z'/%3E%3C/svg%3E");
}
.nav-item[data-tab="chatbot"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='9' width='16' height='11' rx='2'/%3E%3Cpath d='M12 9V5M9 5h6'/%3E%3Cpath d='M9 14h.01M15 14h.01'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='9' width='16' height='11' rx='2'/%3E%3Cpath d='M12 9V5M9 5h6'/%3E%3Cpath d='M9 14h.01M15 14h.01'/%3E%3C/svg%3E");
}
.nav-item[data-tab="accounting"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='2' width='16' height='20' rx='2'/%3E%3Cpath d='M8 6h8'/%3E%3Cpath d='M8 10h.01M12 10h.01M16 10h.01M8 14h.01M12 14h.01M16 14h.01M8 18h.01M12 18h.01M16 18h.01'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='2' width='16' height='20' rx='2'/%3E%3Cpath d='M8 6h8'/%3E%3Cpath d='M8 10h.01M12 10h.01M16 10h.01M8 14h.01M12 14h.01M16 14h.01M8 18h.01M12 18h.01M16 18h.01'/%3E%3C/svg%3E");
}
.nav-item[data-tab="meta"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='14' rx='2'/%3E%3Cpath d='M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='14' rx='2'/%3E%3Cpath d='M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16'/%3E%3C/svg%3E");
}
.nav-item[data-tab="service"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 1.4 1.6 1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E");
}
.nav-item[data-tab="export"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E");
}
.nav-item[data-tab="settings"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E");
}
.sidebar-foot { padding-top: 8px; }
.user-chip {
  padding: 7px;
  border: 1px solid #f1f1f1;
  border-radius: 6px;
  background: #fff;
}
.user-chip strong { font-size: 12px; }
.user-chip span { font-size: 10px; }
.main { background: #fff; }
.topbar {
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  gap: 10px;
  border-bottom: 1px solid #f1f1f1;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}
.topbar h1 {
  margin: 0;
  color: #333;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}
.topbar-actions { gap: 6px; }
.topbar-actions button { min-height: 28px; padding: 0 10px; border-radius: 4px; font-size: 13px; font-weight: 500; }
.nav-menu-btn svg { width: 18px; height: 18px; display: block; color: #666; }
.search-pill { display: none; height: 28px; min-width: 190px; padding: 4px 10px; border: 1px solid #ebebeb; border-radius: 4px; font-size: 13px; }
.crm-page-object-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 5px;
  border-radius: 4px;
  background: #f4f4f4;
  color: #666;
}
.crm-page-object-icon svg,
.crm-nav-icon svg,
.crm-toolbar-object-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.crm-nav-icon { display: inline-grid; place-items: center; width: 15px; height: 15px; flex: 0 0 15px; border-radius: 4px; background: transparent; color: #999; }
.crm-object-contacts { color: #3c63de; }
.crm-object-companies { color: #6d54c9; }
.crm-object-deals { color: #d97742; }
.crm-object-tasks { color: #2f9e6e; }
.crm-object-activity { color: #a87800; }
.crm-favorites { padding: 0 0 6px; }
.crm-favorites[hidden] { display: none !important; }
.crm-favorites-label { padding: 6px 8px 3px; color: #999; font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.crm-favorites-empty { margin: 0; padding: 2px 8px 6px; color: #999; font-size: 11px; line-height: 1.35; }
.crm-favorite-item { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; background: transparent; border: 0; color: inherit; cursor: pointer; }
.crm-favorite-item span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-global-search { padding: 1px 0 6px; }
.crm-global-search[hidden] { display: none !important; }
.crm-global-search-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #ebebeb;
  border-radius: 4px;
  background: #fff;
  color: #999;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}
.crm-global-search-button:hover { background: #f5f5f5; color: #333; }
.crm-global-search-button kbd { padding: 1px 4px; border: 1px solid #ebebeb; border-radius: 3px; background: #fcfcfc; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }

body.crm-workspace-mode .content { min-width: 0; padding: 0; overflow: hidden; }
body.crm-workspace-mode .search-pill,
body.crm-workspace-mode #topbarRefreshBtn { display: none; }
body.crm-workspace-mode .topbar-actions button:not(#crmTopNewBtn):not(#crmWorkspaceSettingsBtn) { display: none; }
body.crm-workspace-mode .mb-nav.active { color: #333; background: #f1f1f1; }
body.crm-workspace-mode .mb-nav.active span { background: #333; color: #fff; }
/* The compact CRM action is only present while the canonical workspace is active. */
.crm-topbar-new { display: none !important; align-items: center; justify-content: center; background: #3c63de !important; color: #fff !important; border: 1px solid #3c63de !important; }
body.crm-workspace-mode .crm-topbar-new { display: inline-flex !important; }
body.crm-workspace-mode .crm-topbar-new[hidden] { display: none !important; }
.crm-topbar-new:hover { background: #2f58d5 !important; border-color: #2f58d5 !important; }
.crm-workspace-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
  padding-right: 10px;
  border-right: 1px solid #f1f1f1;
  font-weight: 600;
}
.crm-workspace-brand[hidden] { display: none !important; }
.crm-workspace-logo { width: 18px; height: 18px; border-radius: 4px; object-fit: cover; }
.crm-workspace-settings-btn { display: none !important; align-items: center; justify-content: center; background: #fff !important; color: #666 !important; border: 1px solid #ebebeb !important; }
body.crm-workspace-mode .crm-workspace-settings-btn { display: inline-flex !important; }
.crm-workspace-settings-btn:hover { background: #f5f5f5 !important; }

#crmWorkspaceRoot { min-width: 0; height: 100%; color: #333; }
#crm.crm-workspace-active > :not(#crmWorkspaceRoot) { display: none !important; }
#crmWorkspaceRoot .crm-ws {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 48px);
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  overflow: hidden;
}
/* Toolbar: view controls stay on the first row; the long list of feature
   dialogs wraps beneath a hairline as a compact ribbon of quiet buttons,
   grouped by hairline separators (all CSS-only ordering). */
#crmWorkspaceRoot .crm-ws-toolbar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px 8px;
  height: auto;
  min-height: 40px;
  padding: 6px 16px 8px;
  border-bottom: 1px solid #f1f1f1;
  background: #fff;
}
#crmWorkspaceRoot .crm-ws-toolbar::after {
  content: '';
  order: 1;
  flex: 0 0 100%;
  height: 0;
  margin: 2px -16px 0;
  border-top: 1px solid #f5f5f5;
}
.crm-toolbar-left { display: flex; align-items: center; gap: 6px; min-width: 0; order: 0; padding-top: 2px; }
.crm-toolbar-right { display: contents; }
.crm-toolbar-object-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 4px; background: #f4f4f4; color: #666; }
.crm-toolbar-view { width: auto; max-width: 174px; height: 28px; margin: 0 !important; padding: 3px 24px 3px 8px !important; border: 1px solid #ebebeb !important; border-radius: 4px !important; background: #fff !important; color: #333; font-size: 13px !important; font-weight: 500; }
.crm-toolbar-view:focus { border-color: #3c63de !important; }
.crm-toolbar-count { color: #999; font-size: 12px; white-space: nowrap; }
.crm-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #666;
  cursor: pointer;
  font-size: 13px !important;
  font-weight: 500 !important;
  white-space: nowrap;
}
.crm-toolbar-menu-item { font-size: 13px !important; }
.crm-toolbar-btn:hover,
.crm-toolbar-btn[aria-expanded="true"],
.crm-toolbar-btn[aria-pressed="true"] { background: #f5f5f5; color: #333; }
.crm-ws-search { width: min(240px, 26vw); height: 28px; margin: 0 !important; padding: 4px 8px !important; border: 1px solid #ebebeb !important; border-radius: 4px !important; background: #fff !important; color: #333; font-size: 13px !important; }
.crm-ws-search:focus { border-color: #3c63de !important; outline: none !important; }
.crm-toolbar-layout { display: flex; gap: 2px; padding: 2px; border: 1px solid #ebebeb; border-radius: 4px; }
.crm-toolbar-layout .crm-toolbar-btn { height: 24px; }
.crm-toolbar-layout .crm-toolbar-btn[aria-pressed="true"] { background: #f1f1f1; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.crm-toolbar-menu {
  position: absolute;
  top: 36px;
  right: 0;
  z-index: 12;
  display: grid;
  min-width: 190px;
  gap: 8px;
  padding: 8px;
  border: 1px solid #ebebeb;
  border-radius: 6px;
  background: #fff;
  box-shadow: 2px 4px 16px rgba(0,0,0,.16), 0 2px 4px rgba(0,0,0,.08);
}
.crm-toolbar-menu label { display: grid; gap: 4px; color: #999; font-size: 11px; }
.crm-toolbar-menu select { width: 100%; height: 28px; margin: 0 !important; padding: 3px 6px !important; border: 1px solid #ebebeb !important; border-radius: 4px !important; background: #fff !important; color: #333; font-size: 13px !important; }
.crm-toolbar-menu-item { width: 100%; min-height: 28px; padding: 5px 8px; border: 0; border-radius: 4px; background: transparent; color: #333; cursor: pointer; font-size: 13px; text-align: left; }
.crm-toolbar-menu-item:hover { background: #f5f5f5; }
.crm-toolbar-menu-note { color: #999; font-size: 11px; line-height: 1.4; }

/* Primary row-1 controls (order 0): workspace, search, columns, tools, filter,
   sort, layout segmented group, options. Feature-dialog launchers live in the
   Tools dropdown, not as ribbon buttons. */
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-action="open-workspace-settings"] { order: 0; margin-left: auto; }
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-action="toggle-search"],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-action="toggle-columns"],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-action="toggle-tools"],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-action="toggle-filter"],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-action="toggle-sort"],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-action="toggle-options"] { order: 0; }
#crmWorkspaceRoot .crm-toolbar-right > .crm-ws-search { order: 0; }
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-layout { order: 0; }
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-menu { order: 0; }

/* Feature-dialog launchers live inside the Tools dropdown menu. */
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn {
  order: 2;
  position: relative;
  height: 24px;
  padding: 0 7px;
  font-size: 12px !important;
  color: #777;
}
.crm-toolbar-tools {
  min-width: 220px;
  max-width: min(320px, calc(100vw - 24px));
  max-height: min(60vh, 480px);
  gap: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.crm-toolbar-tools .crm-toolbar-btn {
  display: flex;
  width: 100%;
  min-height: 26px;
  justify-content: flex-start;
  text-align: left;
}
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn:hover { background: #f5f5f5; color: #333; }
/* Row-1 controls keep the regular size even though they carry data-crm attrs. */
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-action="toggle-columns"] { height: 28px; padding: 0 8px; font-size: 13px !important; color: #666; }

/* Section separators inside the ribbon (leading button of each tool group). */
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-field-auth],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-consent],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-sla-calendars],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-shared-views],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-buying-groups],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-calling-dry],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-shared-identity],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-shell-density],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-pipeline-probabilities],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-contacts-profile],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-chatbot-rules],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-staff-groups],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-zoho-books-dry],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-session-lifecycle],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-version-migrate],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-migration-api],
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-hubspot-sync] {
  margin-left: 12px;
}
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-field-auth]::before,
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-consent]::before,
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-sla-calendars]::before,
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-shared-views]::before,
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-buying-groups]::before,
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-calling-dry]::before,
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-shared-identity]::before,
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-shell-density]::before,
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-pipeline-probabilities]::before,
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-contacts-profile]::before,
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-chatbot-rules]::before,
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-staff-groups]::before,
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-zoho-books-dry]::before,
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-session-lifecycle]::before,
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-version-migrate]::before,
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-migration-api]::before,
#crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn[data-crm-hubspot-sync]::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: #ebebeb;
}

#crmWorkspaceRoot .crm-ws-status { flex: 0 0 auto; margin: 8px 16px; padding: 7px 9px; border-radius: 4px; font-size: 12px; }
#crmWorkspaceRoot [hidden] { display: none !important; }
#crmWorkspaceRoot .crm-ws-content { flex: 1 1 auto; min-width: 0; min-height: 0; max-height: none; padding: 0; overflow: auto; }
#crmWorkspaceRoot .crm-ws-loading { min-height: 100px; padding: 35px 16px; color: #999; font-size: 13px; text-align: left; }
#crmWorkspaceRoot .crm-ws-empty { min-height: 180px; margin: 32px; border: 1px dashed #d6d6d6; border-radius: 8px; font-size: 13px; }
#crmWorkspaceRoot .crm-ws-empty strong { font-size: 14px; font-weight: 600; }
#crmWorkspaceRoot .crm-ws-empty p { font-size: 13px; }
#crmWorkspaceRoot .crm-ws-table-wrap { overflow: auto; border: 0; border-radius: 0; }
#crmWorkspaceRoot .crm-ws-table { min-width: 760px; border-collapse: separate; border-spacing: 0; }
#crmWorkspaceRoot .crm-ws-table th,
#crmWorkspaceRoot .crm-ws-table td { height: 28px; padding: 3px 10px; border-bottom: 1px solid #f1f1f1; font-size: 13px; line-height: 1.3; }
#crmWorkspaceRoot .crm-ws-table th { position: sticky; top: 0; z-index: 2; height: 30px; padding-top: 5px; padding-bottom: 5px; border-bottom: 1px solid #ebebeb; background: #fcfcfc; color: #999; font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; text-align: left; }
#crmWorkspaceRoot .crm-ws-table tbody tr:hover { background: #fafafa; }
#crmWorkspaceRoot .crm-ws-link { font-size: 13px !important; font-weight: 500 !important; }
#crmWorkspaceRoot .crm-ws-subline { margin-top: 1px; font-size: 11px; }
#crmWorkspaceRoot .crm-ws-table .crm-ws-subline { display: none; }
#crmWorkspaceRoot .crm-ws-tags { gap: 3px; }
#crmWorkspaceRoot .crm-ws-tag,
#crmWorkspaceRoot .crm-ws-stage,
#crmWorkspaceRoot .crm-ws-status-pill { min-height: 18px; padding: 0 6px; font-size: 11px; }
#crmWorkspaceRoot .crm-ws-select { height: 24px; margin: 0 !important; padding: 2px 6px !important; border: 1px solid transparent !important; border-radius: 4px !important; background: transparent !important; font-size: 12px !important; }
#crmWorkspaceRoot .crm-ws-select:hover,
#crmWorkspaceRoot .crm-ws-select:focus { border-color: #ebebeb !important; background: #fff !important; }
#crmWorkspaceRoot .crm-ws-btn { min-height: 26px; padding: 0 9px; border-radius: 4px; font-size: 12px; font-weight: 500; }
#crmWorkspaceRoot .crm-ws-actions { gap: 3px; }
#crmWorkspaceRoot .crm-ws-metrics { margin: 0; border: 0; border-bottom: 1px solid #f1f1f1; border-radius: 0; }
#crmWorkspaceRoot .crm-ws-metric { min-height: 68px; padding: 12px 16px; border-right: 1px solid #f1f1f1; }
#crmWorkspaceRoot .crm-ws-metric-label { font-size: 11px; color: #999; }
#crmWorkspaceRoot .crm-ws-metric-value { margin-top: 4px; font-size: 17px; font-weight: 600; }
#crmWorkspaceRoot .crm-ws-overview-grid { gap: 0; }
#crmWorkspaceRoot .crm-ws-panel { border: 0; border-bottom: 1px solid #f1f1f1; border-radius: 0; }
#crmWorkspaceRoot .crm-ws-panel-header { padding: 12px 16px; border-bottom: 1px solid #f1f1f1; }
#crmWorkspaceRoot .crm-ws-panel-header h3 { font-size: 13px; font-weight: 600; }
#crmWorkspaceRoot .crm-ws-panel-body { padding: 12px 16px; }
#crmWorkspaceRoot .crm-ws-board-wrap { padding: 16px; }
#crmWorkspaceRoot .crm-ws-column { border: 1px solid #f1f1f1; border-radius: 8px; background: #fcfcfc; }
#crmWorkspaceRoot .crm-board-stage { display: inline-flex; align-items: center; gap: 5px; }
#crmWorkspaceRoot .crm-board-stage-dot { width: 7px; height: 7px; border-radius: 50%; background: #b3b3b3; }
#crmWorkspaceRoot .crm-board-stage-new { background: #6f86e8; }
#crmWorkspaceRoot .crm-board-stage-qualified { background: #5cb98f; }
#crmWorkspaceRoot .crm-board-stage-proposal { background: #9b7ede; }
#crmWorkspaceRoot .crm-board-stage-won { background: #34a885; }
#crmWorkspaceRoot .crm-board-stage-lost { background: #e4737a; }
#crmWorkspaceRoot .crm-ws-deal-card { border-color: #ebebeb; border-radius: 6px; box-shadow: none; }
#crmWorkspaceRoot .crm-ws-deal-card:hover { border-color: #d6d6d6; }

.crm-advanced-list { display: grid; gap: 2px; }
.crm-advanced-item { display: grid; gap: 2px; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; background: transparent; color: #333; cursor: pointer; text-align: left; }
.crm-advanced-item:hover { background: #f5f5f5; }
.crm-advanced-item strong { font-size: 13px; font-weight: 600; }
.crm-advanced-item span { color: #999; font-size: 12px; }

@media (max-width: 760px) {
  .crm-ws-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .crm-ws-dialog-content { gap: 12px; padding: 14px 16px; }
  .crm-ws-dialog-actions { flex-wrap: wrap; }
  .crm-ws-dialog-actions .crm-ws-btn { flex: 1 1 auto; }
  .crm-ws-command { width: calc(100vw - 16px); }
  .crm-ws-drawer-head { margin: -12.8px -12.8px 10px; padding: 12.8px 12.8px 10px; }
  .crm-ws-attribution dl > div { grid-template-columns: 1fr; gap: 2px; }
  body.crm-workspace-mode .app-shell,
  .app-shell { grid-template-columns: 1fr; }
  body.crm-workspace-mode .topbar { height: 46px; min-height: 46px; padding: 0 10px; }
  body.crm-workspace-mode .topbar h1 { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  body.crm-workspace-mode .content { overflow: hidden; }
  body.crm-workspace-mode .crm-topbar-new { padding-inline: 8px; }
  #crmWorkspaceRoot .crm-ws { min-height: calc(100dvh - 46px); }
  #crmWorkspaceRoot .crm-ws-toolbar { min-height: 40px; padding: 5px 10px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  #crmWorkspaceRoot .crm-ws-toolbar::after { display: none; }
  .crm-toolbar-left { flex: 0 0 auto; min-width: 0; }
  #crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-btn,
  #crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-layout,
  #crmWorkspaceRoot .crm-toolbar-right > .crm-ws-search,
  #crmWorkspaceRoot .crm-toolbar-right > .crm-toolbar-menu { flex: 0 0 auto; }
  .crm-toolbar-view { max-width: 150px; }
  .crm-ws-search { width: 170px; }
  #crmWorkspaceRoot .crm-ws-table th,
  #crmWorkspaceRoot .crm-ws-table td { padding-inline: 8px; }
  #crmWorkspaceRoot .crm-ws-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #crmWorkspaceRoot .crm-ws-metric { min-height: 60px; padding: 10px; }
  #crmWorkspaceRoot .crm-ws-metric-value { font-size: 15px; }
}
@media (max-width: 420px) {
  .brand { padding-left: 5px; }
  body.crm-workspace-mode .topbar { padding-inline: 8px; }
  .crm-page-object-icon { width: 19px; height: 19px; }
  #crmWorkspaceRoot .crm-ws-toolbar { padding-inline: 8px; }
  .crm-toolbar-btn { padding-inline: 6px; }
  .crm-toolbar-view { max-width: 132px; }
  .crm-toolbar-count { display: none; }
  #crmWorkspaceRoot .crm-ws-empty { margin: 20px 12px; }
}

.crm-ws-calendar { padding: 12px 16px 20px; }
.crm-ws-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.crm-ws-cal-weekdays, .crm-ws-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.crm-ws-cal-weekdays { color: #999; font-size: 12px; margin-bottom: 4px; }
.crm-ws-cal-day { min-height: 88px; border: 1px solid #f1f1f1; border-radius: 6px; padding: 4px; background: #fff; }
.crm-ws-cal-day.is-outside { background: #fcfcfc; color: #999; }
.crm-ws-cal-num { display: block; font-size: 12px; margin-bottom: 4px; }
.crm-ws-cal-item { display: block; width: 100%; text-align: left; border: 0; background: #eef2fe; color: #333; border-radius: 4px; padding: 2px 4px; margin-top: 2px; font-size: 12px; cursor: pointer; }
.crm-toolbar-columns { width: 240px; }
.crm-column-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 26px; }
.crm-column-row label { display: flex !important; align-items: center; gap: 6px; color: #333; font-size: 13px; }
.crm-column-row .crm-toolbar-btn { min-height: 22px; padding-inline: 6px; }
#crmWorkspaceRoot .crm-ws-group td { height: auto; background: #fcfcfc; color: #666; font-size: 12px; font-weight: 600; }
