/* Home shortcuts (phones), the All tools list and Edit shortcuts (shortcut-picker.js). The app's own tokens, so both
   themes follow; the icons take the accent, as the Home header's do. */

/* ── the Home block: shown on a phone only; a laptop or tablet keeps its sidebar and header as they were ── */
.hsc { display: none; }
@media (max-width: 640px) {
  .hsc { display: block; margin: 4px 0 14px; }
  /* the header's own phone row: what is a shortcut now is not drawn twice (the check-in, a daily duty, stays) */
  .has-hsc .dh-actions [data-action="quote"], .has-hsc .dh-actions [data-action="followup"], .has-hsc .dh-actions [data-action="sample"] { display: none; }
}
.hsc-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.hsc-h h2 { margin: 0; font-size: 16px; font-weight: 800; }
.hsc-edit { min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line, rgba(255,255,255,.14)); background: transparent;
  color: var(--ink, inherit); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.hsc-edit:focus-visible, .hsc-t:focus-visible, .hsc-all:focus-visible { outline: 2px solid var(--accent, #F7A11A); outline-offset: 2px; }
.hsc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hsc-t { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; padding: 10px 6px; border-radius: 14px;
  border: 1px solid var(--line, rgba(255,255,255,.14)); background: var(--e1, rgba(255,255,255,.02)); color: var(--ink, inherit);
  font: inherit; font-size: 13px; font-weight: 800; line-height: 1.2; text-align: center; cursor: pointer; min-width: 0; }
.hsc-t svg, .hsc-all svg.hsc-all__i { width: 24px; height: 24px; fill: none; stroke: var(--accent, #F7A11A); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hsc-t span { overflow-wrap: anywhere; hyphens: auto; }
.hsc-t:active { transform: scale(.98); }
.hsc-note { margin: 8px 0 0; font-size: 12.5px; color: var(--steel, #a9b1ba); }
.hsc-empty { margin: 0; font-size: 13px; color: var(--steel, #a9b1ba); }
.hsc-all { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 8px; min-height: 60px; padding: 10px 14px; border-radius: 14px;
  border: 1px solid var(--line, rgba(255,255,255,.14)); background: var(--e1, rgba(255,255,255,.02)); color: var(--ink, inherit); font: inherit; text-align: start; cursor: pointer; }
.hsc-all b { display: block; font-size: 15px; }
.hsc-all small { display: block; font-size: 12.5px; color: var(--steel, #a9b1ba); line-height: 1.35; }
.hsc-all span { flex: 1; min-width: 0; }
.hsc-all svg.hsc-all__c { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
@media (max-width: 340px) { .hsc-t { font-size: 12px; min-height: 70px; } }

/* ── All tools (in the sheet) ── */
.atl h3 { margin: 16px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--steel, #a9b1ba); }
.atl ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.atl button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 12px; border-radius: 12px;
  border: 1px solid var(--line, rgba(255,255,255,.14)); background: var(--e1, transparent); color: var(--ink, inherit); font: inherit; font-weight: 700; font-size: 14px; text-align: start; cursor: pointer; }
.atl button svg { width: 20px; height: 20px; fill: none; stroke: var(--accent, #F7A11A); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.atl button:focus-visible { outline: 2px solid var(--accent, #F7A11A); outline-offset: 2px; }
.atl .atl-pin { margin-inline-start: auto; font-size: 11px; font-weight: 800; color: var(--steel, #a9b1ba); }

/* ── Edit shortcuts ── */
html.scp-open, html.scp-open body { overflow: hidden; }
.scp { position: fixed; inset: 0; z-index: 1700; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.6); }
.scp-box-in { display: flex; flex-direction: column; width: min(560px, 100%); max-height: min(92dvh, 900px); border-radius: 18px; overflow: hidden;
  background: var(--e2, #17191c); color: var(--ink, #f2f3f5); border: 1px solid var(--line, rgba(255,255,255,.14)); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
:root[data-scheme="light"] .scp-box-in { background: #fff; color: #1d1a16; border-color: rgba(18,20,23,.14); }
.scp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 16px 8px; }
.scp-head h2 { margin: 0; font-size: 19px; font-weight: 800; }
.scp-sub { margin: 4px 0 0; font-size: 13px; color: var(--steel, #a9b1ba); }
:root[data-scheme="light"] .scp-sub, :root[data-scheme="light"] .scp-h, :root[data-scheme="light"] .scp-note { color: #5f5a52; }
.scp-count { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; background: var(--wash, rgba(255,255,255,.08)); border: 1px solid var(--line, rgba(255,255,255,.14)); }
.scp-count.is-full { border-color: var(--accent, #F7A11A); }
.scp-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 16px 8px; }
.scp-h { margin: 14px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--steel, #a9b1ba); }
.scp-h small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.scp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.scp-row { display: flex; align-items: center; gap: 6px; border-radius: 12px; }
.scp-check { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 10px; border-radius: 12px; border: 1px solid transparent;
  background: transparent; color: inherit; font: inherit; font-size: 15px; text-align: start; cursor: pointer; }
.scp-row.is-on .scp-check { border-color: var(--line, rgba(255,255,255,.14)); background: var(--wash, rgba(255,255,255,.04)); }
.scp-box { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--line, rgba(255,255,255,.3)); background: var(--wash, rgba(255,255,255,.06)); }
.scp-row.is-on .scp-box { background: var(--ink, #fff); border-color: var(--ink, #fff); }
.scp-box svg { width: 15px; height: 15px; fill: none; stroke: var(--e2, #111); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
:root[data-scheme="light"] .scp-box svg { stroke: #fff; }
:root[data-scheme="light"] .scp-row.is-on .scp-box { background: #1d1a16; border-color: #1d1a16; }
.scp-ic { width: 20px; height: 20px; fill: none; stroke: var(--accent, #F7A11A); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.scp-l { min-width: 0; overflow-wrap: anywhere; }
.scp-move { display: flex; gap: 4px; flex: none; }
.scp-mv { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line, rgba(255,255,255,.14));
  background: transparent; color: inherit; cursor: pointer; }
.scp-mv svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.scp-mv:disabled { opacity: .35; cursor: default; }
.scp-check:focus-visible, .scp-mv:focus-visible, .scp-btn:focus-visible { outline: 2px solid var(--accent, #F7A11A); outline-offset: 2px; }
.scp-note { min-height: 1.2em; margin: 6px 2px 0; font-size: 13px; color: var(--steel, #a9b1ba); }
.scp-empty { margin: 6px 2px; font-size: 13px; color: var(--steel, #a9b1ba); }
.scp-prev { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.scp-pv { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 64px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line, rgba(255,255,255,.14)); text-align: center; }
.scp-pv svg { width: 20px; height: 20px; fill: none; stroke: var(--accent, #F7A11A); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.scp-pv b { font-size: 12px; line-height: 1.2; overflow-wrap: anywhere; }
.scp-err { margin: 0; padding: 8px 16px; font-size: 13.5px; font-weight: 700; color: var(--danger, #E5645A); }
.scp-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line, rgba(255,255,255,.12)); }
.scp-sp { flex: 1; }
.scp-btn { min-height: 46px; padding: 0 16px; border-radius: 12px; font: inherit; font-weight: 800; cursor: pointer; border: 1px solid var(--line, rgba(255,255,255,.2)); background: transparent; color: inherit; }
.scp-btn--pri { background: var(--accent, #F7A11A); border-color: var(--accent, #F7A11A); color: var(--ink-on-accent, #1A1205); min-width: 96px; }
.scp-btn:disabled { opacity: .6; cursor: default; }
@media (max-width: 520px) {
  .scp { padding: 0; align-items: stretch; }
  .scp-box-in { width: 100%; max-height: none; height: 100%; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top); }
  .scp-foot .scp-btn--ghost[data-scp="reset"] { order: 3; flex-basis: 100%; }
  .scp-foot .scp-sp { display: none; }
  .scp-foot .scp-btn[data-scp="cancel"], .scp-foot .scp-btn[data-scp="save"] { flex: 1; }
}
/* ── v4.232: the phone Home without boxes (the user's screenshots: no card per shortcut, no All tools card,
   a lighter Today). Spacing and alignment separate things; a hairline is the only line. ── */
.today__ph { display: none; }
@media (max-width: 640px) {
  .home-today { background: transparent; border: 0; border-radius: 0; padding: 4px 0 0; box-shadow: none; }
  .today__lap { display: none; }
  .today__ph { display: block; }
  .today__ph-h { display: flex; align-items: center; justify-content: space-between; min-height: 36px; font-size: 16px; font-weight: 800; color: var(--ink, inherit); }
  .today__more { width: 44px; height: 44px; margin-inline-end: -12px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--ink-subtle, var(--steel, #a9b1ba)); cursor: pointer; border-radius: 10px; }
  .today__more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  [dir="rtl"] .today__more svg { transform: scaleX(-1); }
  .today__ms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .today__m { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 52px; padding: 4px 0; border: 0; background: transparent; color: var(--ink, inherit); font: inherit; text-align: start; cursor: pointer; border-radius: 10px; }
  .today__m b { font-size: 22px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
  .today__m span { font-size: 12.5px; color: var(--ink-subtle, var(--steel, #a9b1ba)); }
  .today__m.is-late b { color: var(--danger, #E5645A); }
  .today__m.is-news b { color: var(--accent-ink, var(--accent, #F7A11A)); }
  .today__m:active, .today__more:active { background: var(--wash, rgba(127,127,127,.12)); }
  .today__m:focus-visible, .today__more:focus-visible { outline: 2px solid var(--accent, #F7A11A); outline-offset: 2px; }

  .hsc { margin: 14px 0 8px; }
  .hsc-h h2 { font-size: 16px; }
  .hsc-edit { border: 0; background: transparent; padding: 0 4px; min-height: 44px; color: var(--accent-ink, var(--accent, #F7A11A)); }
  .hsc-grid { gap: 2px 4px; }
  .hsc-t { border: 0; background: transparent; box-shadow: none; min-height: 72px; padding: 8px 4px; border-radius: 12px; font-weight: 700; gap: 8px; }
  .hsc-t svg { width: 26px; height: 26px; }
  .hsc-t:active { transform: none; background: var(--wash, rgba(127,127,127,.12)); }
  .hsc-all { border: 0; border-top: 1px solid var(--hairline, var(--line, rgba(127,127,127,.25))); border-radius: 0; background: transparent; box-shadow: none;
    margin-top: 10px; min-height: 56px; padding: 10px 2px; gap: 12px; }
  .hsc-all svg.hsc-all__i { width: 22px; height: 22px; stroke: var(--ink, currentColor); stroke-width: 1.8; }
  .hsc-all b { font-size: 15px; }
  .hsc-all:active { background: var(--wash, rgba(127,127,127,.12)); }
}
/* ── v4.233: one row per widget on the phone Home, the whole card on tap ── */
.hw { margin: 6px 0 14px; }
.hw-h { margin: 0 0 4px; font-size: 16px; font-weight: 800; }
.hw-list { list-style: none; margin: 0; padding: 0; }
.hw-list li + li .hw-row { border-top: 1px solid var(--hairline, var(--line, rgba(127,127,127,.25))); }
.hw-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 2px; border: 0; background: transparent;
  color: var(--ink, inherit); font: inherit; text-align: start; cursor: pointer; border-radius: 0; }
.hw-row:active { background: var(--wash, rgba(127,127,127,.12)); }
.hw-row:focus-visible { outline: 2px solid var(--accent, #F7A11A); outline-offset: 2px; }
.hw-i { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--accent, #F7A11A); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hw-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hw-t b { font-size: 15px; font-weight: 800; }
.hw-t small { font-size: 12.5px; color: var(--ink-subtle, var(--steel, #a9b1ba)); line-height: 1.35; overflow-wrap: anywhere; }
.hw-v { flex: none; max-width: 42%; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: end; overflow-wrap: anywhere; }
.hw-v.is-late { color: var(--danger, #E5645A); }
.hw-c { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ink-subtle, currentColor); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .hw-c, [dir="rtl"] .hw-link svg { transform: scaleX(-1); }
.hw-ttl { margin: 2px 0 12px; font-size: 22px; font-weight: 800; }
.hw-link { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; margin-top: 10px; padding: 0 2px;
  border: 0; border-top: 1px solid var(--hairline, var(--line, rgba(127,127,127,.25))); background: transparent; color: var(--accent-ink, var(--accent, #F7A11A));
  font: inherit; font-weight: 800; cursor: pointer; }
.hw-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
/* the volume page shows the volume panel only (no greeting and buttons above it), always open */
.hd-vol .dh-top { display: none; }
.hd-vol .dh-collapse { display: none; }
/* ── v4.234: the phone Home header, premium (the user: "make it look more professional and premium and update the
   font"). One typeface, Inter (the app's own, shipped for offline use), in a clear hierarchy: a quiet date line, a
   tight semibold greeting with the name in gold, a soft supporting line; the check-in as a slim pill. ── */
@media (max-width: 640px) {
  .has-hsc #dh, .has-hsc #dh :where(button) { font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; }
  .has-hsc #dh { background: transparent; border: 0; box-shadow: none; }   /* no panel behind the greeting, in either theme */
  .has-hsc #dh .dh-top { padding: 8px 2px 6px; gap: 14px; }
  .has-hsc #dh .dh-eyebrow { font-family: inherit; font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; gap: 12px; color: var(--dh-muted); }
  .has-hsc #dh .dh-eyebrow > span:first-child { font-feature-settings: "tnum"; }
  .has-hsc #dh .dh-sync { font-size: 12px; font-weight: 500; gap: 6px; }
  .has-hsc #dh .dh-sync i { width: 6px; height: 6px; box-shadow: 0 0 0 3px rgba(47,179,107,.16); }
  .has-hsc #dh .dh-hello { margin-top: 8px; font-family: inherit; font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -.025em; }
  .has-hsc #dh .dh-hello span { color: var(--accent-ink, var(--accent, #F7A11A)); }   /* the readable gold: deeper on a light page (WCAG) */
  .has-hsc #dh .dh-lead { margin: 6px 0 0; font-family: inherit; font-size: 14.5px; font-weight: 400; line-height: 1.45; letter-spacing: -.005em; color: var(--dh-muted); }
  /* the check-in: a slim pill on the left, icon and word in one line */
  .has-hsc #dh .dh-actions { width: 100%; }
  .has-hsc #dh .dh-actions .dh-ci { flex: 0 0 auto; width: auto; height: 38px; min-height: 38px; padding: 0 14px 0 12px; border-radius: 999px;
    flex-direction: row; gap: 8px; font-size: 13.5px; font-weight: 600; letter-spacing: 0; }
  .has-hsc #dh .dh-actions .dh-ci svg { width: 18px; height: 18px; }
  .has-hsc #dh .dh-actions .dh-ci > span { display: none; }
  .has-hsc #dh .dh-actions .dh-ci .dh-short { display: inline; position: static; font: inherit; }
  .has-hsc #dh .dh-actions .dh-ci .dh-ci-dot { display: none; }
}
/* ── v4.235: the manager's phone dashboard, the same premium language as the rep's Home ── */
.mph { display: none; }
@media (max-width: 640px) {
  .mph { display: block; padding: 6px 2px 4px; font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink, inherit); }
  .mph-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
  .mph-date { flex: 1 1 auto; font-size: 13px; font-weight: 500; color: var(--ink-subtle, var(--steel, #a9b1ba)); font-feature-settings: "tnum"; min-width: 0; white-space: nowrap; }
  /* One line with the pill and the buttons: the whole date when it fits, "Tue 27 Oct" on a narrow phone instead of
     cutting "Tuesday 27 Octo…" (v4.240, the layout audit). */
  .mph-ds { display: none; }
  @media (max-width: 400px) { .mph-dl { display: none; } .mph-ds { display: inline; } }
  .mph-acts { display: flex; align-items: center; gap: 0; flex: none; }
  .mph-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; white-space: nowrap; flex: none; margin-inline-end: 4px; border-radius: 999px; border: 1px solid var(--hairline, var(--line, rgba(127,127,127,.25)));
    background: transparent; color: var(--ink-subtle, inherit); font: 600 12px/1 inherit; font-family: inherit; cursor: pointer; }
  .mph-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--warning, #F5A524); }
  .mph-pill.is-live i { background: var(--success, #2FB36B); box-shadow: 0 0 0 3px rgba(47,179,107,.16); }
  .mph-ib { position: relative; width: 40px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--ink, inherit); cursor: pointer; border-radius: 10px; }
  .mph-ib svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mph-ib:active, .mph-pill:active { background: var(--wash, rgba(127,127,127,.12)); }
  .mph-ib:focus-visible, .mph-pill:focus-visible { outline: 2px solid var(--accent, #F7A11A); outline-offset: 2px; }
  .mph-ib.is-spinning svg { animation: mph-spin .9s linear infinite; }
  @keyframes mph-spin { to { transform: rotate(360deg); } }
  .mph-dot { position: absolute; top: 10px; inset-inline-end: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger, #E5645A); box-shadow: 0 0 0 2px var(--canvas, #08080a); }
  .mph-hello { margin: 6px 0 0; font-family: inherit; font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -.025em; }
  .mph-hello span { color: var(--accent-ink, var(--accent, #F7A11A)); }
  .mph-lead { margin: 6px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-subtle, var(--steel, #a9b1ba)); }
  .mto { margin-top: 14px; }
  /* a widget alone on its page: the KPI section's own header is the page's (Back above it), so it stands down */
  .mdw-page { display: block; padding-bottom: 8px; }
  .mdw-tile .md-head { display: none; }
  .mtl { padding: 0 2px; }
}
@media print { .hsc, .scp { display: none !important; } }
