.cf-widget,.cf-dialog { --cf-bg:#0a1525;--cf-panel:#132238;--cf-text:#eff6ff;--cf-muted:#aabbd0;--cf-border:#425772;--cf-accent:#62c5ff; color:var(--cf-text);background:var(--cf-bg);font-family:inherit;letter-spacing:0; }
html[data-theme="light"] :is(.cf-widget,.cf-dialog) { --cf-bg:#fff;--cf-panel:#eef4fa;--cf-text:#15263b;--cf-muted:#4d6278;--cf-border:#b9cbe0;--cf-accent:#0563b4; }
.cf-widget[hidden] { display:none!important; }
.cf-widget { display:flex;position:relative;align-items:center;gap:6px;padding:5px 8px;border:1px solid var(--cf-border);border-radius:8px;flex:0 0 auto; }
.cf-widget-status { width:125px;min-width:0;display:grid;gap:3px;font-size:12px; }
.cf-widget-status span { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--cf-muted);font-size:11px; }
.cf-widget button,.cf-dialog button { display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:36px;min-height:36px;border:1px solid var(--cf-border);border-radius:6px;background:var(--cf-panel);color:var(--cf-text);font:inherit;cursor:pointer;padding:6px 9px; }
.cf-widget button { font-size:12px; }
.cf-widget button:disabled,.cf-dialog button:disabled { opacity:.5;cursor:default; }
.cf-widget button.cf-entry,.cf-dialog .cf-primary { background:#0867c9;color:#fff;border-color:#297ed2; }
.cf-widget svg,.cf-dialog svg { width:19px;height:19px;flex:none; }
.cf-last { position:absolute;top:100%;right:0;font-size:10px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:var(--cf-bg);padding:2px 5px;border-radius:3px; }
.cf-widget-error { color:#e06868!important; }
html[data-theme="light"] .cf-widget-error { color:#a52222!important;-webkit-text-fill-color:currentColor!important; }
#dashboardSection .cf-widget button { position:static!important;display:inline-flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;padding:6px!important;white-space:nowrap!important; }
#dashboardSection .cf-widget button.cf-entry { width:116px!important;min-width:116px!important;background:#0867c9!important;color:#fff!important; }
#dashboardSection .cf-widget button svg { width:18px!important;height:18px!important;color:inherit!important; }
#dashboardSection .cf-widget button.cf-entry span:not([data-lucide-icon]) { font-size:12px!important;line-height:1!important;color:#fff!important; }
.cf-store-strip[hidden] { display:none!important; }
.cf-store-strip { display:flex;align-items:center;margin:0 0 22px; }
#dashboardSection #cfDesktopWidget button { display:inline-flex!important;flex-direction:row!important;position:static!important;flex:0 0 36px!important;width:36px!important;min-width:36px!important;max-width:36px!important;height:36px!important;min-height:36px!important;max-height:36px!important;margin:0!important;padding:6px!important;background:var(--cf-panel)!important;color:var(--cf-text)!important; }
#dashboardSection #cfDesktopWidget button.cf-entry { flex-basis:116px!important;width:116px!important;min-width:116px!important;max-width:116px!important;background:#0867c9!important;color:#fff!important; }
#dashboardSection #cfDesktopWidget button svg { display:block!important;flex:0 0 18px!important;width:18px!important;height:18px!important;color:inherit!important; }
#dashboardSection #cfDesktopWidget .cf-widget-status { width:110px; }
.cf-roster { display:flex;gap:20px;flex-wrap:wrap;padding:16px 0;border-bottom:1px solid var(--cf-border); }
.cf-roster span { display:grid;gap:5px; }
.cf-roster small { color:var(--cf-muted); }
#customerFlowDialog button svg { color:inherit!important;opacity:1!important; }
#customerFlowDialog :is(input,select) { background:var(--cf-panel)!important;color:var(--cf-text)!important;border-color:var(--cf-border)!important;border-radius:6px!important; }
html[data-theme="dark"] #customerFlowDialog :is(input,select) { color-scheme:dark!important; }
html[data-theme="light"] #customerFlowDialog :is(input,select) { color-scheme:light!important; }
#customerFlowDialog button.cf-primary { background:#0867c9!important;color:#fff!important; }
#customerFlowDialog.cf-dialog :is(input,select) { box-shadow:none!important;-webkit-text-fill-color:var(--cf-text)!important; }
#customerFlowDialog.cf-dialog button.cf-primary,#customerFlowDialog.cf-dialog button.cf-primary :is(span,svg) { color:#fff!important;-webkit-text-fill-color:#fff!important; }
.cf-dialog { width:min(1200px,calc(100vw - 32px));max-width:1200px;height:min(900px,calc(100dvh - 40px));max-height:calc(100dvh - 40px);border:1px solid var(--cf-border);border-radius:8px;padding:0;overflow:hidden; }
.cf-dialog::backdrop { background:rgba(0,0,0,.65); }
.cf-dialog[open] { display:flex;flex-direction:column; }
.cf-dialog .cf-header { display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;border-bottom:1px solid var(--cf-border);flex:none; }
.cf-header>div { display:flex;align-items:center;gap:10px; }
.cf-dialog h2 { font-size:22px;margin:0;color:var(--cf-text); }
.cf-dialog h3 { font-size:17px;margin:24px 0 12px;color:var(--cf-text); }
.cf-body { overflow:auto;overscroll-behavior:contain;min-height:0;padding:20px; }
.cf-filters { display:flex;align-items:end;flex-wrap:wrap;gap:12px;border-bottom:1px solid var(--cf-border);padding-bottom:20px; }
.cf-dialog label { display:grid;gap:6px;font-size:12px;color:var(--cf-muted); }
.cf-dialog input,.cf-dialog select,.cf-dialog summary { min-height:38px;background:var(--cf-panel);color:var(--cf-text);border:1px solid var(--cf-border);border-radius:6px;padding:8px;font-size:14px;color-scheme:dark;max-width:100%; }
html[data-theme="light"] .cf-dialog :is(input,select) { color-scheme:light; }
.cf-dialog input[type="checkbox"] { min-height:18px;width:18px;margin:0;accent-color:#0867c9; }
.cf-dialog :focus-visible,.cf-widget :focus-visible { outline:3px solid var(--cf-accent);outline-offset:2px; }
#cfStores { position:relative;min-width:160px; }
#cfStores summary { cursor:pointer; }
.cf-store-options { position:absolute;z-index:2;top:100%;left:0;width:280px;max-height:280px;overflow:auto;background:var(--cf-bg);border:1px solid var(--cf-border);padding:12px;box-shadow:0 5px 20px #0003; }
.cf-store-options label { display:flex;align-items:center;gap:8px;padding:8px 0;color:var(--cf-text); }
.cf-metrics { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:20px;padding:24px 0;border-bottom:1px solid var(--cf-border); }
.cf-metrics>div { display:grid;gap:8px; }
.cf-metrics span { font-size:12px;color:var(--cf-muted); }
.cf-metrics strong { font-size:28px;color:var(--cf-text);overflow-wrap:anywhere; }
.cf-sales-totals { display:flex;gap:24px;flex-wrap:wrap;padding-top:18px;font-size:14px; }
.cf-sales-totals strong { margin-left:8px; }
.cf-muted { color:var(--cf-muted)!important;font-size:12px; }
.cf-error { color:#ed8d8d!important; }
html[data-theme="light"] .cf-error { color:#a52222!important; }
.cf-table-wrap { overflow:auto;max-width:100%; }
.cf-dialog table { border-collapse:collapse;width:100%;font-size:13px;background:transparent; }
.cf-dialog th,.cf-dialog td { padding:12px 10px;border-bottom:1px solid var(--cf-border);text-align:left;color:var(--cf-text);white-space:nowrap; }
.cf-dialog th { color:var(--cf-muted);background:var(--cf-panel);font-size:12px; }
.cf-empty { padding:30px 0;text-align:center;color:var(--cf-muted); }
.cf-section-heading { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px; }
.cf-section-heading h3 { margin:0; }
@media(min-width:768px) and (max-width:1199px) {
  #dashboardSection .desktop-reference-main:has(#cfDesktopWidget:not([hidden])) .rm-home-hero { padding-top:80px!important; }
}
@media(max-width:767px) {
  .cf-dialog { width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
  .cf-dialog .cf-header { padding:14px 16px; }
  .cf-body { padding:16px; }
  .cf-metrics { grid-template-columns:repeat(2,minmax(0,1fr));gap:16px; }
  .cf-filters>label { flex:1 1 130px;min-width:0; }
  .cf-filters input,.cf-filters select { width:100%;box-sizing:border-box; }
  .cf-widget { gap:6px;padding:8px; }
  .cf-widget-status { width:100px;font-size:12px; }
  .cf-widget-status span { font-size:11px; }
  .cf-widget button { min-width:36px;min-height:36px;padding:6px;font-size:12px; }
  .cf-widget svg { width:18px;height:18px; }
  .cf-store-strip .cf-widget { flex:1 1 auto;min-width:0; }
  .cf-store-strip .cf-widget-status { flex:1 1 auto;min-width:0; }
}

/* Compact customer queue: daily metrics, last assignment and next action. */
#dashboardSection .cf-widget {
  gap:12px;padding:10px 12px;border-radius:16px;
  background:linear-gradient(140deg,var(--cf-panel),var(--cf-bg));
  border-color:var(--cf-border);box-shadow:0 6px 20px #00000018;
}
#dashboardSection #cfDesktopWidget .cf-widget-status,
#dashboardSection .cf-widget .cf-widget-status { width:142px;min-width:0;gap:7px; }
.cf-widget-counts { display:grid;grid-template-columns:1fr 1fr;gap:8px; }
.cf-mini-stat { display:flex;flex-direction:column;gap:2px;padding-right:10px; }
.cf-mini-stat + .cf-mini-stat { border-left:1px solid var(--cf-border);padding-left:10px;padding-right:0; }
#dashboardSection .cf-widget .cf-mini-stat strong { font-size:21px!important;line-height:1!important;letter-spacing:-.5px; }
#dashboardSection .cf-widget .cf-mini-stat span { font-size:10px!important;line-height:1.3!important;color:var(--cf-muted)!important; }
.cf-last-person { display:flex;align-items:center;gap:5px;min-width:0;font-size:11px; }
.cf-last-person b { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600; }
.cf-last-dot { width:5px;height:5px;border-radius:50%;background:var(--cf-accent);flex:none; }
#dashboardSection .cf-widget button.cf-entry,
#dashboardSection #cfDesktopWidget button.cf-entry {
  flex:0 0 142px!important;width:142px!important;min-width:142px!important;max-width:142px!important;
  height:60px!important;min-height:60px!important;max-height:60px!important;
  gap:9px!important;padding:8px 10px!important;border-radius:13px!important;
  background:linear-gradient(145deg,#147ee9,#0759b8)!important;
  border:1px solid #429cf2!important;box-shadow:0 4px 12px #0870d52b!important;
  transition:filter .15s ease,transform .15s ease;
}
#dashboardSection .cf-widget button.cf-entry:hover { filter:brightness(1.1); }
#dashboardSection .cf-widget button.cf-entry:active { transform:translateY(1px); }
#dashboardSection .cf-widget button.cf-entry,
#dashboardSection .cf-widget button.cf-entry :is(span,svg),
#dashboardSection #cfDesktopWidget button.cf-entry,
#dashboardSection #cfDesktopWidget button.cf-entry :is(span,svg) {
  color:#fff!important;-webkit-text-fill-color:#fff!important;text-shadow:none!important;
}
#dashboardSection .cf-widget button.cf-entry .cf-entry-copy {
  display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:5px!important;min-width:0!important;
}
#dashboardSection .cf-widget button.cf-entry .cf-entry-label { font-size:12px!important;font-weight:700!important; }
#dashboardSection .cf-widget button.cf-entry .cf-entry-next {
  display:block!important;font-size:11px!important;line-height:1.1!important;font-weight:500!important;
  max-width:99px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
#dashboardSection .cf-widget button.cf-entry svg { stroke:currentColor!important; }
.cf-utility-actions { display:flex;gap:6px; }
#dashboardSection .cf-widget .cf-utility-actions button,
#dashboardSection #cfDesktopWidget .cf-utility-actions button {
  width:34px!important;min-width:34px!important;max-width:34px!important;flex-basis:34px!important;
  height:38px!important;min-height:38px!important;max-height:38px!important;border-radius:11px!important;
  box-shadow:none!important;transition:background .15s ease;
}
#dashboardSection .cf-widget .cf-utility-actions button:hover { background:var(--cf-border)!important; }
@media(max-width:767px) {
  #dashboardSection .cf-widget { gap:8px;padding:10px;flex-wrap:wrap; }
  #dashboardSection .cf-widget .cf-widget-status { flex:1 1 126px;width:auto; }
  #dashboardSection .cf-widget .cf-utility-actions { margin-left:auto; }
}

/* Keep the dashboard navigation and account actions around Customer Flow. */
html body #dashboardSection .desktop-reference-main.cf-workspace-active > :not(.desktop-reference-actions):not(#customerFlowDialog) { display:none!important; }
#customerFlowDialog.cf-embedded {
  position:relative!important;inset:auto!important;margin:76px 0 0!important;
  width:100%!important;max-width:none!important;height:auto!important;
  min-height:60vh;max-height:none!important;box-sizing:border-box;
}
#customerFlowDialog.cf-embedded .cf-body { overflow:visible; }

#customerFlowDialog.cf-embedded { box-shadow:none!important; z-index:1; overflow:visible; min-width:0; }
#customerFlowDialog.cf-dialog th .cf-sort {
  display:inline-flex!important; width:auto!important; height:auto!important;
  min-width:0!important; min-height:32px!important; padding:0!important; gap:6px;
  background:transparent!important; border:0!important; border-radius:3px!important;
  box-shadow:none!important; color:inherit!important; font:inherit; text-align:left;
}
#customerFlowDialog .cf-sort:focus-visible { outline:2px solid var(--cf-accent); outline-offset:3px; }
#customerFlowDialog th[aria-sort="ascending"], #customerFlowDialog th[aria-sort="descending"] { color:var(--cf-accent); }
