/* ProfitPlus workspace layer
   Loaded after the shared theme and client shape sheets. Keep this file surface-only:
   behavior, routes, role gates and required controls remain owned by their modules.
   App shell is scoped by body.workspace-ui; client portal routes also carry body.cl-app.
*/

/* Local design draft: restrained depth, familiar red accent and opaque work surfaces. Named themes keep their token
   sets. Every component rule below reads theme tokens so named/custom themes remain color-aware. */
html[data-ui-theme="studio"]:has(body.workspace-ui) {
  --g-theme-name: "Studio";
  --g-theme-blurb: "A clear workspace with subtle depth and the ProfitPlus red accent.";
  --g-canvas: #eff2f7;
  --g-mesh: radial-gradient(ellipse at 0% 0%, #f4e9ec 0%, transparent 58%), radial-gradient(ellipse at 100% 0%, #dce7f5 0%, transparent 65%), linear-gradient(160deg, #f2f4f8, #e9eff2);
  --g-solid-1: #f6f7fa;
  --g-solid-2: #ffffff;
  --g-solid-3: #fafbfc;
  --g-solid-4: #ffffff;
  --g-solid-sunken: #eceef1;
  --g-fill-1: #f6f7fa;
  --g-fill-2: #ffffff;
  --g-fill-3: #fafbfc;
  --g-fill-4: #ffffff;
  --g-fill-nested: #f7f8fa;
  --g-sheen-1: none;
  --g-sheen-2: none;
  --g-sheen-3: none;
  --g-sheen-4: none;
  --g-blur-1: none;
  --g-blur-2: none;
  --g-blur-3: none;
  --g-blur-4: none;
  --g-hairline: #dfe2e7;
  --g-hairline-strong: #c9cdd4;
  --g-edge-1: inset 0 0 0 1px #dfe2e7;
  --g-edge-2: inset 0 0 0 1px #e2e5e9;
  --g-edge-3: inset 0 0 0 1px #dfe2e7;
  --g-edge-4: inset 0 0 0 1px #dfe2e7;
  --g-spec-1: none;
  --g-spec-2: none;
  --g-spec-3: none;
  --g-spec-4: none;
  --g-shadow-1: none;
  --g-shadow-2: 0 2px 8px rgba(28, 42, 67, .05);
  --g-shadow-3: 0 8px 24px rgba(16, 24, 40, .10);
  --g-shadow-4: 0 16px 40px rgba(16, 24, 40, .18);
  --g-e1: 0 1px 2px rgba(16, 24, 40, .05);
  --g-e2: 0 2px 6px rgba(16, 24, 40, .08);
}

html[data-ui-theme="studio"][data-theme="dark"]:has(body.workspace-ui) {
  --g-canvas: #101216;
  --g-mesh: linear-gradient(180deg, #101216 0%, #14171c 100%);
  --g-solid-1: #171a1f;
  --g-solid-2: #1b1e24;
  --g-solid-3: #20242b;
  --g-solid-4: #252930;
  --g-solid-sunken: #111318;
  --g-fill-1: #171a1f;
  --g-fill-2: #1b1e24;
  --g-fill-3: #20242b;
  --g-fill-4: #252930;
  --g-fill-nested: #181b20;
  --g-hairline: #30343c;
  --g-hairline-strong: #414650;
  --g-edge-1: inset 0 0 0 1px #30343c;
  --g-edge-2: inset 0 0 0 1px #30343c;
  --g-edge-3: inset 0 0 0 1px #414650;
  --g-edge-4: inset 0 0 0 1px #414650;
  --g-e1: 0 1px 2px rgba(0, 0, 0, .24);
  --g-e2: 0 2px 8px rgba(0, 0, 0, .30);
}

@media (prefers-color-scheme: dark) {
  html[data-ui-theme="studio"]:not([data-theme="light"]):not([data-theme="dark"]):has(body.workspace-ui) {
    --g-canvas: #101216;
    --g-mesh: linear-gradient(180deg, #101216 0%, #14171c 100%);
    --g-solid-1: #171a1f;
    --g-solid-2: #1b1e24;
    --g-solid-3: #20242b;
    --g-solid-4: #252930;
    --g-solid-sunken: #111318;
    --g-fill-1: #171a1f;
    --g-fill-2: #1b1e24;
    --g-fill-3: #20242b;
    --g-fill-4: #252930;
    --g-fill-nested: #181b20;
    --g-hairline: #30343c;
    --g-hairline-strong: #414650;
    --g-edge-1: inset 0 0 0 1px #30343c;
    --g-edge-2: inset 0 0 0 1px #30343c;
    --g-edge-3: inset 0 0 0 1px #414650;
    --g-edge-4: inset 0 0 0 1px #414650;
    --g-e1: 0 1px 2px rgba(0, 0, 0, .24);
    --g-e2: 0 2px 8px rgba(0, 0, 0, .30);
  }
}

body.workspace-ui {
  color: var(--g-text);
  font-family: var(--g-font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.workspace-ui .layout,
body.workspace-ui .main,
body.workspace-ui #content { min-width: 0; }
body.workspace-ui .main::before {
  background-color: var(--g-solid-1);
  background-image: none;
}

/* Solid app chrome: retain the sticky header's opaque backing so content cannot bleed behind it. */
body.workspace-ui #sidebar.g-chrome,
body.workspace-ui #mainhead.g-chrome,
body.workspace-ui #tabbar.g-chrome,
body.workspace-ui.cl-app #sidebar,
body.workspace-ui.cl-app #mainhead,
body.workspace-ui.cl-app #tabbar {
  background-color: var(--g-solid-1);
  background-image: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: inset 0 0 0 1px var(--g-hairline);
}
body.workspace-ui #mainhead.g-chrome,
body.workspace-ui.cl-app #mainhead {
  color: var(--g-text);
}
body.workspace-ui #content .glass-2,
body.workspace-ui.cl-app #content .glass-2 {
  background-color: var(--g-solid-2);
  background-image: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: inset 0 0 0 1px var(--g-hairline);
}
body.workspace-ui #content .glass-2::before,
body.workspace-ui #content .glass-2::after,
body.workspace-ui.cl-app #content .glass-2::before,
body.workspace-ui.cl-app #content .glass-2::after { pointer-events: none; }

/* Repeated work surfaces: restrained edge, clear hierarchy, preserved semantic status colors. */
body.workspace-ui #content .home { max-width: 1000px; }
body.workspace-ui #content .home-hero { padding: 4px 2px 2px; }
body.workspace-ui #content .home-name {
  font-size: clamp(22px, 2vw, 26px);
  line-height: 1.2;
  letter-spacing: -.025em;
}
body.workspace-ui #content .home-stats { gap: 10px; }
body.workspace-ui #content .home-stat {
  min-width: 0;
  min-height: 76px;
  padding: 12px 14px;
  border-radius: var(--g-r-card);
}
body.workspace-ui #content .home-stat-n { line-height: 1.15; }
body.workspace-ui #content .home-stat-l { font-size: 12px; line-height: 1.35; }
body.workspace-ui #content .home-card { border-radius: var(--g-r-card); }
body.workspace-ui #content .home-card-h {
  min-height: 42px;
  padding-top: 10px;
  padding-bottom: 10px;
  color: var(--g-text-2);
  letter-spacing: .035em;
}
body.workspace-ui #content .home-task,
body.workspace-ui #content .home-md-row { min-height: 44px; }
body.workspace-ui #content .home-greet,
body.workspace-ui #content .home-date { font-size: 13px; }
body.workspace-ui #content .home-stat.is-red .home-stat-n { color: var(--red, var(--g-red)); }

/* Clear, visible keyboard focus without recoloring success/warning/error states. */
body.workspace-ui :where(
  a, button, input, select, textarea, summary,
  [role="button"], [role="tab"], [tabindex]:not([tabindex="-1"])
):focus-visible {
  outline: 2px solid var(--g-accent);
  outline-offset: 2px;
}
body.workspace-ui :where(button, input, select, textarea) { font-family: inherit; }
body.workspace-ui #content :where(p, .adsv-hint, .dops-explain-lead, .empty p) {
  line-height: 1.5;
}
body.workspace-ui #content :where(.adsv-hint, .dops-explain-lead) {
  max-width: 72ch;
  color: var(--g-text-2);
}

/* The existing wide tables remain their own intentional horizontal scrollers. */
body.workspace-ui #content .ptable-scroll,
body.workspace-ui #content .adsv-table-wrap,
body.workspace-ui #content .tlist-scroll,
body.workspace-ui #content .tcal-scroll,
body.workspace-ui #content .dops-table-wrap,
body.workspace-ui #content .cal-grid-scroll {
  max-width: 100%;
  overscroll-behavior-x: contain;
}
body.workspace-ui #content :where(.adsv-content, .adsv-tabbar, .adsv-head, .adsv-section, .adsv-sechead,
  .adsm-campaigns, .adsm-cmp, .adsm-pace, .adsm-trend-card, .adsm-rollup) {
  min-width: 0;
  max-width: 100%;
}
body.workspace-ui #content .adsv-head > *,
body.workspace-ui #content .adsv-sechead > * { min-width: 0; }

/* Compact phone chrome while retaining all actions and the safe-area footer. */
@media (max-width: 720px) {
  /* The mobile header is in normal flow now; its old fixed headroom mask only left a blank band. */
  .main::before { display: none; }

  /* The footer owns the full bottom safe area, so reserve exactly its actual height in scrollers. */
  body.workspace-ui { --tabbar-safe: calc(var(--tabbar-h) + var(--safe-bottom)); }
  /* #content is the one scroll-reserve owner: dock height + safe area + 24px breathing room.
     The base shell reserves the same dock on both .main and .content; clear the outer reserve
     here so phone pages do not accumulate a second dock-sized blank band. */
  body.workspace-ui .main { padding-bottom: 0; }
  body.workspace-ui #content { padding-bottom: calc(var(--tabbar-safe) + 24px); }

  body.workspace-ui #mainhead,
  body.workspace-ui.cl-app #mainhead {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    margin-top: calc(var(--safe-top) + var(--g-s-3, 12px));
  }
  body.workspace-ui #mainhead.g-chrome,
  body.workspace-ui.cl-app #mainhead {
    position: static;
    top: auto;
    margin-top: calc(var(--safe-top) + var(--g-s-3, 12px));
    padding: 10px 12px 0;
    border-radius: 12px;
  }
  body.workspace-ui #mainhead .crumb { min-height: 44px; gap: 8px; margin-bottom: 4px; }
  body.workspace-ui #mainhead .crumb-list { font-size: 18px; line-height: 1.2; }
  body.workspace-ui #content { padding-top: 12px; }
  body.workspace-ui #tabbar.g-chrome,
  body.workspace-ui.cl-app #tabbar {
    min-height: 56px;
    border-radius: 0;
    background-color: var(--g-solid-1);
    box-shadow: 0 -1px 0 var(--g-hairline);
  }
  body.workspace-ui #tabbar,
  body.workspace-ui.cl-app #tabbar {
    position: fixed !important;
    top: auto !important;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: calc(var(--tabbar-h) + var(--safe-bottom));
    min-height: calc(var(--tabbar-h) + var(--safe-bottom));
    box-sizing: border-box;
    padding: 0 var(--safe-right) var(--safe-bottom) var(--safe-left);
    border: 0;
    border-top: 1px solid var(--g-hairline);
    border-radius: 0;
    background-color: var(--g-solid-1);
    background-image: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 -1px 0 var(--g-hairline);
  }
  body.workspace-ui #tabbar .tabbar-btn,
  body.workspace-ui.cl-app #tabbar .cl-tab {
    min-width: 44px;
    min-height: 44px;
    font-size: 12px;
    line-height: 1.2;
  }
  body.workspace-ui #content .home { gap: 12px; }
  body.workspace-ui #content .home-stats { gap: 8px; }
  body.workspace-ui #content .home-stat { min-height: 68px; padding: 10px 12px; }
  body.workspace-ui #content .home-card { padding: 4px; }
  body.workspace-ui #content .home-card-h { min-height: 44px; }
  body.workspace-ui #content .home-primary { grid-template-columns: minmax(0, 1fr); }
}

/* Keep the timer explanation readable on phones without hiding its shortcut toggle. */
@media (max-width: 540px) {
  body.workspace-ui #content .clock-foot { align-items: flex-start; flex-wrap: wrap; }
  body.workspace-ui #content .clock-hint {
    flex: 1 1 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.45;
  }
  body.workspace-ui #content .clock-sc-toggle { margin-left: auto; }
}

/* The Home primary work cards share the first row on wider screens when there are exactly two.
   The native Finance disclosure keeps every existing finance card reachable below that row. */
body.workspace-ui #content .home-primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
@media (min-width: 900px) {
  body.workspace-ui #content .home-primary:has(> :nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
body.workspace-ui #content details.home-finance {
  overflow: visible;
  border: 1px solid var(--g-hairline);
  border-radius: var(--g-r-card);
  background-color: var(--g-solid-2);
}
body.workspace-ui #content details.home-finance > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 14px;
  color: var(--g-text);
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}
body.workspace-ui #content details.home-finance > summary > span {
  color: var(--g-text-2);
  font-size: 12px;
  font-weight: 500;
}
body.workspace-ui #content details.home-finance > summary::-webkit-details-marker { display: none; }
body.workspace-ui #content details.home-finance > summary::after {
  content: '›';
  margin-left: auto;
  color: var(--g-text-2);
  font-size: 20px;
  transform: rotate(90deg);
}
body.workspace-ui #content details.home-finance[open] > summary::after { transform: rotate(-90deg); }
body.workspace-ui #content .home-finance-body {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

/* Morning brief: quick read, visible status language, and no decorative data-visual effects. */
body.workspace-ui #content .morning-brief { padding: 12px 14px; }
body.workspace-ui #content .morning-brief-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 32px;
  padding: 0 0 10px;
}
body.workspace-ui #content .morning-brief-date {
  margin-left: auto;
  color: var(--g-text-2);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
body.workspace-ui #content .morning-brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
body.workspace-ui #content .morning-brief-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--g-hairline);
  border-radius: var(--g-r-card);
  background-color: var(--g-solid-3);
}
body.workspace-ui #content .morning-brief-item > span {
  color: var(--g-text-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}
body.workspace-ui #content .morning-brief-item > div {
  color: var(--g-text);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
body.workspace-ui #content .morning-brief-item small {
  color: var(--g-text-2);
  font-size: 11px;
  line-height: 1.4;
}
body.workspace-ui #content .morning-brief-link {
  min-height: 36px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--g-accent);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
}
body.workspace-ui #content .morning-brief-note {
  margin: 10px 0 0;
  color: var(--g-text-2);
  font-size: 11px;
}

/* Multi-assignee task creation: the scroll stays inside the options list, while each person row
   remains a comfortable pointer and keyboard target. */
body.workspace-ui fieldset.task-assignees {
  min-width: 0;
  padding: 0;
  border: 0;
}
body.workspace-ui .task-assignees > legend {
  padding: 0;
}
body.workspace-ui .task-assignee-list {
  max-height: 180px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 2px;
  border: 1px solid var(--g-hairline);
  border-radius: var(--g-r-ctl, 14px);
  background-color: var(--g-solid-3);
}
body.workspace-ui .task-assignee-list > label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  padding: 4px 8px;
  border-radius: var(--g-r-ctl, 14px);
  cursor: pointer;
}
body.workspace-ui .task-assignee-list > label:hover {
  background-color: var(--g-fill-hover, var(--g-fill-3));
}
body.workspace-ui .task-assignee-list input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
}
body.workspace-ui .task-assignee-list label > span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--g-text);
  line-height: 1.35;
}
body.workspace-ui small.task-assignee-hint {
  display: block;
  margin-top: 6px;
  color: var(--g-text-2);
  font-size: 12px;
  line-height: 1.45;
}

/* At phone widths, keep the task views visible and give the root-owned More actions disclosure a
   usable target. No required control is hidden; table/list scrollers retain their own overflow. */
@media (max-width: 720px) {
  body.workspace-ui[data-module="tasks"] #mainhead .head-controls.hc-tasks .hc-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "search search" "chips chips" "new more";
    align-items: center;
    gap: 6px;
  }
  body.workspace-ui[data-module="tasks"] #mainhead .head-controls.hc-tasks .hc-tools:has(.ls-search) {
    grid-template-areas: "search search" "chips chips" "new more";
  }
  body.workspace-ui[data-module="tasks"] #mainhead .head-controls.hc-tasks .hc-tools:not(:has(.ls-search)) {
    grid-template-areas: "chips chips" "new more";
  }
  body.workspace-ui[data-module="tasks"] #mainhead .head-controls.hc-tasks .hc-tools > .head-spacer { display: none; }
  body.workspace-ui[data-module="tasks"] #mainhead .head-controls.hc-tasks .ls-search {
    grid-area: search;
    width: 100%;
    min-width: 0;
  }
  body.workspace-ui[data-module="tasks"] #mainhead .head-controls.hc-tasks .tq-chips { grid-area: chips; justify-self: start; }
  body.workspace-ui[data-module="tasks"] #mainhead .head-controls.hc-tasks .hc-tools > [data-act="add-task"] {
    grid-area: new;
    justify-self: start;
    min-height: 44px;
  }
  body.workspace-ui[data-module="tasks"] #mainhead .task-tools-more { grid-area: more; justify-self: end; }
  body.workspace-ui[data-module="tasks"] #mainhead .head-controls.hc-tasks > .tabset.vtab-row {
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }
  body.workspace-ui[data-module="tasks"] #mainhead .task-tools-more > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 6px 10px;
    border: 1px solid var(--g-hairline);
    border-radius: var(--g-r-ctl, 14px);
    background-color: var(--g-solid-2);
    color: var(--g-text);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    list-style: none;
  }
  body.workspace-ui[data-module="tasks"] #mainhead .task-tools-more > summary::-webkit-details-marker { display: none; }
  body.workspace-ui[data-module="tasks"] #mainhead .task-tools-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    max-width: min(92vw, 420px);
    padding: 8px;
    border: 1px solid var(--g-hairline-strong);
    border-radius: var(--g-r-card);
    background-color: var(--g-solid-2);
    box-shadow: var(--g-e2);
  }
}

@media (max-width: 520px) {
  body.workspace-ui[data-module="adsManager"] #content .adsv-head,
  body.workspace-ui[data-module="adsManager"] #content .adsv-tabbar,
  body.workspace-ui[data-module="adsManager"] #content .adsv-content,
  body.workspace-ui[data-module="adsManager"] #content .adsv-section {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  body.workspace-ui[data-module="adsManager"] #content .adsv-head { gap: 8px; }
  body.workspace-ui[data-module="adsManager"] #content .adsv-head-actions { margin-left: 0; max-width: 100%; }
  body.workspace-ui[data-module="adsManager"] #content .adsv-idt { min-width: 0; overflow-wrap: anywhere; }
  body.workspace-ui[data-module="adsManager"] #content .adsv-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
  }
  body.workspace-ui[data-module="adsManager"] #content .adsv-metrics > * { min-width: 0; }
  body.workspace-ui[data-module="adsManager"] #content .adsv-table-wrap { overflow-x: auto; }
}

/* Honor the user's motion setting while preserving non-animated state changes and live indicators. */
@media (prefers-reduced-motion: reduce) {
  body.workspace-ui *, body.workspace-ui *::before, body.workspace-ui *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Phone toolbars wrap their real controls; no action is hidden behind the viewport edge. */
@media (max-width: 720px) {
  body.workspace-ui[data-module="calendar"] .cal-hr {
    display:flex; flex-wrap:wrap; min-width:0; width:100%; max-width:100%;
    justify-content:flex-start;
  }
  body.workspace-ui[data-module="calendar"] .cal-search { flex:1 1 180px; max-width:100%; }
  body.workspace-ui[data-module="calendar"] .cal-hr > * { flex-shrink:0; }
  body.workspace-ui[data-module="calendar"] .cal-hr .cal-new { margin-left:auto; }
  body.workspace-ui[data-module="dailyOps"] .dops-head-r { flex-wrap:wrap; min-width:0; max-width:100%; }
  body.workspace-ui[data-module="dailyOps"] .dops-copymulti { max-width:100%; white-space:normal; }
}

.service-terms { margin-top:12px; border-top:1px solid var(--g-hairline); padding-top:8px; }
.service-terms > summary { min-height:44px; cursor:pointer; font-weight:650; display:flex; align-items:center; }
.service-terms p { font-size:12px; line-height:1.5; color:var(--g-text-2); margin:5px 0 10px; }
.service-terms-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.service-terms-grid label { display:flex; flex-direction:column; gap:5px; min-width:0; font-size:12px; color:var(--g-text-2); }
.service-terms-grid input,.service-terms-grid select { width:100%; min-height:42px; min-width:0; font:inherit; border:1px solid var(--g-hairline-strong); border-radius:6px; padding:8px; color:var(--g-text); background:var(--g-solid-2); }
.service-confirm { display:flex; align-items:center; gap:8px; min-height:44px; font-size:12px; }
.service-confirm input { width:16px; height:16px; flex-shrink:0; }
.service-terms-result { font-weight:650; }
@media(max-width:520px){.service-terms-grid{grid-template-columns:minmax(0,1fr);}}

.service-value-card { padding:20px; margin:0 0 18px; border:1px solid var(--g-hairline); border-radius:14px; background:var(--g-solid-2); color:var(--g-text); }
.service-value-heading h2 { margin:0 0 6px; font-size:18px; letter-spacing:-.02em; }
.service-value-heading p,.service-value-caveat { color:var(--g-text-2); font-size:12px; line-height:1.5; margin:0 0 14px; }
.service-value-totals { display:flex; flex-wrap:wrap; gap:24px; margin:18px 0; }
.service-value-number { display:flex; flex-direction:column; gap:5px; }
.service-value-number strong { font-size:28px; font-variant-numeric:tabular-nums; letter-spacing:-.03em; }
.service-value-number span,.service-value-number small { color:var(--g-text-2); font-size:12px; }
.service-value-unknown { font-size:19px; font-weight:650; }
.service-value-card summary { padding:10px 0; min-height:44px; cursor:pointer; font-size:13px; font-weight:650; }
.service-value-client { padding:12px 0; border-top:1px solid var(--g-hairline); }
.service-value-client>div:first-child { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.service-value-client p { font-size:12px; color:var(--g-text-2); }
.service-value-line { display:flex; flex-wrap:wrap; gap:6px 14px; padding:8px 0; font-size:12px; }
.service-value-line>small { flex-basis:100%; color:var(--g-text-2); }
.service-collection { flex-basis:100%; display:flex; flex-direction:column; gap:5px; padding:10px; border-left:2px solid var(--g-accent); background:var(--g-fill-2); }
.service-collection small { color:var(--g-text-2); line-height:1.5; }
@media(max-width:520px){.service-value-card{padding:16px;}.service-value-number strong{font-size:25px;}}

/* Refinement after original/draft comparison: separate surfaces without flattening the brand. */
html[data-ui-theme="studio"] body.workspace-ui #content .glass-2 {
  box-shadow: inset 0 0 0 1px var(--g-hairline), var(--g-shadow-2);
}
body.workspace-ui #content .morning-brief-head { margin: 0; padding: 0; min-height: 36px; cursor: pointer; }
body.workspace-ui #content .morning-brief-head::after { content: '›'; margin-left: 4px; font-size: 20px; line-height: 1; transform: rotate(90deg); }
body.workspace-ui #content .morning-brief[open] .morning-brief-head::after { transform: rotate(-90deg); }
body.workspace-ui #content .morning-brief[open] .morning-brief-head { margin-bottom: 12px; }

/* Empty-state illustrations must not enlarge icons inside their action buttons. */
body.workspace-ui #content .empty .btn svg { width: 16px; height: 16px; margin: 0; opacity: 1; flex-shrink: 0; }

/* Optional plans and retained collection records are independent editing surfaces. */
.simple-billing-plan [hidden] { display:none !important; }
.simple-billing-plan .service-terms-grid + .service-terms-grid { margin-top:10px; }
.simple-billing-plan input,.simple-billing-plan select { box-sizing:border-box; height:44px; }
.billing-tracking-details { margin-top:10px; border-top:1px solid var(--g-hairline); }
.billing-tracking-details > summary { min-height:44px; display:flex; align-items:center; cursor:pointer; font-weight:600; font-size:13px; }
.billing-tracking-details > p { font-size:12px; color:var(--g-text-2); line-height:1.5; margin:0 0 10px; }
.billing-tracking-details input { min-width:0; max-width:100%; }
@media(max-width:520px){.billing-tracking-details > div > label{flex-wrap:wrap;max-width:100%;}.v2bil-mrr{white-space:normal;overflow-wrap:anywhere;}}

.billing-editor-head h3 { min-width:0; flex:1; overflow-wrap:anywhere; }
.billing-editor-head > .icon-btn { flex:none; }
.recorded-billing-terms .service-confirm { display:flex; flex-direction:row; align-items:center; }
.recorded-billing-terms .service-confirm input { width:16px; min-height:16px; }

.bil-line > div > .bl-svc { box-sizing:border-box; height:44px; min-width:0; border:1px solid var(--g-hairline-strong); border-radius:6px; padding:8px; font:inherit; color:var(--g-text); background:var(--g-solid-2); }

/* Safari paints today's date as the native empty date hint; keep an unset start visibly blank. */
.simple-billing-plan input[type=date][data-empty]::-webkit-datetime-edit,
.simple-billing-plan input[type=date][data-empty]::-webkit-date-and-time-value { color:transparent; }
.simple-billing-plan input[type=date][data-empty] { color:transparent; -webkit-text-fill-color:transparent; }
