/* My day (M3 v2, flow-1 prototype; top structure like every list, Sami 2026-11-16, DECISIONS #303): rows with Call / WhatsApp, log drawer. */
:root {
  --md-dw: 520px;
  --md-ease: cubic-bezier(.2, .8, .2, 1);
  --md-font-ar: Cairo, var(--font);
  --md-call: #2f5be0; --md-call-top: #4f7cff;
  --md-wa: #25d366; --md-wa-top: #3ade7a;
}
.md-page { transition: padding-inline-end .34s var(--md-ease); } /* width: main.page-focus (app.css) */
@media (min-width: 1280px) { body.md-dw-open:not(.md-dw-modal) .md-page { padding-inline-end: calc(var(--md-dw) + 24px); } }

/* Temporary pointer to Sales Guide › Lead Stages (guideHint.js): at the end of the greeting line; the quote gives way so it stays one line */
.gd-hint { flex: none; display: inline-flex; align-items: center; border-radius: var(--r-pill); background: var(--c-accent-soft); box-shadow: inset 0 0 0 1px var(--c-accent-line); animation: gd-hint-in .5s ease-out both; }
.gd-hint-go { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: var(--r-pill); color: var(--c-accent-text); font-size: var(--fs-table); font-weight: var(--fw-semibold); text-decoration: none; white-space: nowrap; }
.gd-hint-go:hover { background: var(--c-nav-on); }
.gd-hint-go .ico { width: 16px; height: 16px; }
.gd-hint-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 0 rgba(59, 111, 224, .5); animation: gd-hint-pulse 1.8s ease-out infinite; }
.gd-hint-x { display: grid; place-items: center; width: 26px; height: 26px; margin-inline-end: 3px; border: 0; border-radius: 50%; background: transparent; color: var(--c-muted); cursor: pointer; }
.gd-hint-x:hover { background: var(--c-card); color: var(--c-ink); }
.gd-hint-x .ico { width: 14px; height: 14px; }
@keyframes gd-hint-pulse { 70% { box-shadow: 0 0 0 7px rgba(59, 111, 224, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 111, 224, 0); } }
@keyframes gd-hint-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .gd-hint, .gd-hint-dot { animation: none; } }

/* ---- toolbar: one white box like every list (Sami 2026-11-16, DECISIONS #303): the search with its chips inside, Filters, Group by ---- */
.md-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: var(--sp-3); padding: 6px; background: var(--c-card); border: 1px solid var(--c-card-line); border-radius: var(--r-lg); box-shadow: var(--card-shadow); }
.md-search { flex: 1 1 200px; min-width: 150px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: 36px; padding: 3px 10px 3px 12px; border: 1px solid transparent; border-radius: var(--r-md); background: var(--c-tile); color: var(--c-faint); transition: border-color .15s, background .15s, box-shadow .15s; }
.md-search:hover { background: var(--c-select); }
.md-search:focus-within { background: var(--c-card); border-color: var(--c-accent); box-shadow: var(--focus-ring); color: var(--c-accent); }
.md-search > .ico { flex: none; width: 16px; height: 16px; }
.md-search .fx-chip { height: 26px; padding-inline-start: 8px; }
.md-search input { flex: 1 1 90px; min-width: 60px; height: 28px; padding: 0; border: 0; box-shadow: none; outline: 0; background: none; font: inherit; font-size: var(--fs-table); color: var(--c-ink); }
.md-search input:focus { border: 0; box-shadow: none; } /* the focus ring is on the whole box (:focus-within) */
.md-search input::placeholder { color: var(--c-faint); }
/* Type: All · Calls · WhatsApp · Meetings */
/* Filters button + panel (a bottom sheet at phone width) */
.md-fwrap { position: relative; flex: none; }
.md-fscrim { display: none; }
.md-fpanel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 18; width: 420px; max-width: calc(100vw - 32px); height: min(66vh, 560px); display: flex; flex-direction: column; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(28, 27, 37, .35), 0 2px 6px rgba(28, 27, 37, .05); outline: none; animation: mdFin .18s var(--md-ease); }
.md-fhead { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 4px 18px; }
.md-fhead h2 { margin: 0; font-size: var(--fs-body); font-weight: var(--fw-semibold); color: var(--c-ink); }
.md-fhead .icon-btn { width: 32px; height: 32px; font-size: var(--fs-title); }
.md-fbody { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: var(--sp-1) 18px var(--sp-3); }
/* Each section is a drop-down (Sami 2026-11-13): the Advanced filters box (.fx-msel) with its name, opening in place to the
   Advanced filters option rows (.fx-opt + .fx-box tick boxes). One open at a time; counts stay live. */
.md-fdd + .md-fdd { margin-top: var(--sp-2); }
.md-fdd-btn { height: 44px; color: var(--c-muted); }
.md-fdd-btn b { flex: none; font-weight: var(--fw-semibold); color: var(--c-ink); }
.md-fdd-btn span { text-align: end; font-weight: var(--fw-regular); }
.md-fdd-btn.on span { font-weight: var(--fw-semibold); }
.md-fdd-btn .fx-badge { flex: none; font-style: normal; }
.md-fdd-btn .ico { transition: transform .2s var(--md-ease); }
.md-fdd.open .md-fdd-btn { border-color: var(--c-accent); }
.md-fdd.open .md-fdd-btn .ico { transform: rotate(180deg); color: var(--c-accent); }
.md-fdd-box { margin-top: 6px; padding: 6px; background: var(--c-card); border: 1px solid var(--c-card-line); border-radius: var(--r-lg); box-shadow: var(--card-shadow); animation: mdFin .16s var(--md-ease); }
.md-fdd-box[hidden] { display: none; }
.md-fdd-q { margin: 0 0 6px; }
.md-fdd-list { max-height: 264px; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 1px; }
.md-fdd-list .md-fo { min-height: 40px; }
.md-fdd-list .md-fo.on { background: none; color: var(--c-ink); font-weight: var(--fw-medium); }
.md-fdd-list .md-fo:hover, .md-fdd-list .md-fo:focus-visible { background: var(--c-select); color: var(--c-ink); }
.md-fdd[data-dd="late"] .md-fo.on { background: var(--c-accent-soft); color: var(--c-accent-text); font-weight: var(--fw-semibold); }
.md-fo.zero:not(.on), .md-fo.none:not(.on) { color: var(--c-muted); }
.md-fo[lang="ar"] span { font-family: var(--md-font-ar); }
.md-fo em { flex: none; font-style: normal; font-size: var(--fs-hint); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; color: var(--c-faint); }
.md-fo .md-fdot { width: 8px; height: 8px; flex: none; border: 0; border-radius: 50%; background: currentColor; }
.md-fdd-f { display: flex; justify-content: flex-end; margin-top: 6px; padding: 6px 2px 0; border-top: 1px solid var(--c-line); }
.md-fdd-f[hidden] { display: none; }
.md-fnone { padding: 16px 0 20px; font-size: var(--fs-table); color: var(--c-faint); }
.md-ffoot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--c-select); }
.md-ffoot .btn { height: 36px; padding: 0 14px; font-size: var(--fs-table); border-radius: var(--r-md); }
.md-ffoot .btn:disabled { opacity: .45; cursor: default; }
.md-fcount { font-size: var(--fs-table); font-weight: var(--fw-medium); color: var(--c-muted); font-variant-numeric: tabular-nums; }
@keyframes mdFin { from { opacity: 0; transform: translateY(-4px); } }
@keyframes mdFup { from { transform: translateY(100%); } }
/* Active filter chips live inside the search box, before the input (Sami 2026-11-16, DECISIONS #303); the wrapper adds no box of its own. */
.md-chips { display: contents; }
.md-chips .fx-chip b[lang="ar"] { font-family: var(--md-font-ar); }

/* ---- groups and rows ---- */
.md-grp { margin-top: 14px; }
.md-grp-h { display: flex; align-items: baseline; gap: 8px; padding: 10px 6px 8px; }
.md-grp-h h2 { margin: 0; font-size: var(--fs-table); font-weight: var(--fw-semibold); color: var(--c-ink); }
.g-priority .md-grp-h h2 { color: var(--c-danger); }
.md-grp-h .n { font-size: var(--fs-hint); font-weight: var(--fw-semibold); color: var(--c-faint); font-variant-numeric: tabular-nums; }
.md-grp-h .hint { margin-inline-start: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-hint); color: var(--c-faint); }
.md-grp-h.solo { padding: 0 6px 8px; }
.md-grp-h.solo .hint { margin-inline-start: 0; }
.md-grp-empty { padding: 12px 16px; border: 1px dashed var(--c-line-strong); border-radius: var(--r-lg); font-size: var(--fs-hint); color: var(--c-faint); }
.md-none { display: grid; gap: 4px; padding: 40px 16px; text-align: center; font-size: var(--fs-table); color: var(--c-faint); }
.md-none b { color: var(--c-ink); }
.md-lst { list-style: none; margin: 0; padding: 0; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 18px; overflow: hidden; }
.md-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding-inline-end: 16px; border-top: 1px solid var(--c-select); transition: background .15s; }
.md-row:first-child { border-top: 0; }
.md-row:hover { background: var(--c-tile); }
.md-row::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; transition: background .2s; }
.md-row.on { background: var(--c-select); }
.md-row.on::before { background: var(--c-ink); }
.md-open { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; min-width: 0; padding: 12px 8px 12px 16px; border: 0; background: transparent; font: inherit; color: inherit; text-align: start; cursor: pointer; /* hover: on .md-row:hover */ }
.md-open:focus-visible { outline: 2px solid var(--c-ink); outline-offset: -2px; border-radius: var(--r-lg); }
.md-av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 0; font-size: var(--fs-table); font-weight: var(--fw-semibold); letter-spacing: .02em; }
.md-av.lg { width: 48px; height: 48px; font-size: var(--fs-body); }
.md-main { min-width: 0; display: grid; gap: 7px; }
.md-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.md-top b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-body); font-weight: var(--fw-semibold); color: var(--c-ink); }
.md-top .badge { flex: none; font-size: var(--fs-hint); padding: 2px 9px; }
.md-voice { display: flex; gap: 6px; align-items: center; min-width: 0; overflow: hidden; }
.md-voice:empty { display: none; }
/* the planned action type, in place of the initials circle */
.md-ty { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--c-muted); background: var(--c-page); } /* the planned type as a grey shape: colour only where it means something (quiet look B, DECISIONS #238) */
.md-ty svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
/* the filtered count line */
/* a picked Type is impossible to miss */
/* touch: no browser press menu or text selection on rows (long-press shows the interests instead) */
@media (pointer: coarse) { .md-row { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } }
/* the salesperson (My team): always first on the line, in the same place on every row; feedback and interests follow (Sami 2026-11-13) */
.md-owner { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-hint); color: var(--c-muted); white-space: nowrap; }
.md-owner .ico { width: 13px; height: 13px; }
.md-due { display: grid; justify-items: end; gap: 2px; padding-inline-start: 8px; text-align: end; white-space: nowrap; }
.md-due b { font-size: var(--fs-table); font-weight: var(--fw-semibold); color: var(--c-ink); font-variant-numeric: tabular-nums; }
.md-due small { font-size: var(--fs-hint); color: var(--c-faint); }
.md-due.late b { color: var(--c-danger); }
.md-due.soon b { color: var(--c-warning); }
/* Call / WhatsApp (Sami 2026-11-09, the sales team works on tablets): one finger-sized round button everywhere it appears
   (My day rows, the Log activity head): 44px; the lead page uses 32, 40 on phones (lead-detail.css), a 20px sign, 10px apart so the wrong one is not hit. */
.md-acts { display: flex; align-items: center; gap: 10px; }
.md-act { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--c-card); text-decoration: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .25); transition: transform .2s, box-shadow .2s; }
.md-act.call { background: linear-gradient(180deg, var(--md-call-top), var(--md-call)); }
.md-act.wa { background: linear-gradient(180deg, var(--md-wa-top), var(--md-wa)); }
/* The same round icons inside the log drawer header: smaller, so they sit with the name and badges (Sami 2026-11-08). */
.md-act svg { width: 20px; height: 20px; }
.md-act.sm { width: 30px; height: 30px; flex: none; }
.md-act.sm svg { width: 15px; height: 15px; }
.md-dw-acts .md-act.sm:hover { transform: scale(1.08); }
.md-act:hover { transform: scale(1.1); box-shadow: 0 8px 18px -6px rgba(47, 91, 224, .5); }
.md-act.wa:hover { box-shadow: 0 8px 18px -6px rgba(37, 211, 102, .6); }
.md-act:active { transform: scale(.95); }
/* on the row Call / WhatsApp are small outlined buttons; the drawer keeps the filled ones (quiet look B, Sami 2026-11-13, DECISIONS #238) */
.md-row .md-act { width: 36px; height: 36px; background: var(--c-card); border: 1px solid var(--c-line-strong); box-shadow: none; }
.md-row .md-act.call { color: var(--md-call); }
.md-row .md-act.wa { color: var(--md-wa); }
.md-row .md-act svg { width: 17px; height: 17px; }
/* hover = the filled look of Log activity and the lead page, so the button says "tap me" (Sami 2026-11-16, DECISIONS #311) */
.md-row .md-act { transition: background .12s, border-color .12s, color .12s; }
.md-row .md-act.call:hover { background: linear-gradient(180deg, var(--md-call-top), var(--md-call)); border-color: var(--md-call); color: var(--c-card); transform: none; box-shadow: 0 6px 14px -6px rgba(47, 91, 224, .5); }
.md-row .md-act.wa:hover { background: linear-gradient(180deg, var(--md-wa-top), var(--md-wa)); border-color: var(--md-wa); color: var(--c-card); transform: none; box-shadow: 0 6px 14px -6px rgba(37, 211, 102, .6); }
/* the stage on a row and in the drawer head: outlined, no fill */
:is(.md-top, .md-dw-sub) .badge { background: var(--c-card); }
.md-act:focus-visible { outline: 2px solid var(--c-btn); outline-offset: 2px; }
.md-more { position: relative; }
.md-more-ph { width: 30px; }
.md-more summary { list-style: none; display: grid; place-items: center; width: 30px; height: 30px; font-size: var(--fs-section); }
.md-more summary::-webkit-details-marker { display: none; }
.md-more summary:hover, .md-more[open] summary { background: var(--c-accent); color: var(--c-card); } /* a row action: fills blue like rowIcon */
.md-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; display: grid; min-width: 200px; padding: 4px; background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--r-md); box-shadow: 0 12px 28px -12px rgba(28, 27, 37, .3); }
.md-menu button { padding: 8px 10px; border: 0; border-radius: var(--r-md); background: none; font: inherit; font-size: var(--fs-table); color: var(--c-ink); text-align: start; cursor: pointer; }
.md-menu button:hover, .md-menu button:focus-visible { background: var(--c-select); }

/* ---- drawer ---- */
.md-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(28, 27, 37, .2); opacity: 0; pointer-events: none; transition: opacity .25s; }
.md-scrim.open { opacity: 1; pointer-events: auto; }
@media (min-width: 1280px) { .md-scrim { display: none; } }
.md-dw { position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: var(--md-dw); max-width: 100vw; display: flex; flex-direction: column; background: var(--c-card); box-shadow: -1px 0 0 var(--c-line), -40px 0 80px -40px rgba(28, 27, 37, .28); transform: translateX(calc(100% + 40px)); visibility: hidden; transition: transform .34s var(--md-ease), visibility 0s linear .34s; }
.md-dw.open { transform: none; visibility: visible; transition: transform .34s var(--md-ease); }
@media (max-width: 1279px) { .md-dw { left: 0; width: auto; } } /* tablet: Log activity takes the whole screen, not a strip over a dimmed list (DECISIONS #238) */
/* Log activity in the middle (Sami 2026-11-16, DECISIONS #287): one card (log + Interests / Timeline) over a blurred page, so the
   half-shown My day behind it no longer confuses people. Wide screens only; tablet (full screen) and phone (bottom sheet) unchanged. */
@media (min-width: 1100px) {
  .md-scrim.md-scrim-c { display: block; background: rgba(16, 24, 40, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  .md-dw.md-dw-c { top: 50%; left: 50%; right: auto; bottom: auto; width: min(var(--md-dw), calc(100vw - 48px)); height: min(880px, calc(100dvh - 48px)); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); overflow: hidden; opacity: 0; transform: translate(-50%, -48%) scale(.98); transition: transform .26s var(--md-ease), opacity .2s, visibility 0s linear .26s; }
  .md-dw.md-dw-c.open { opacity: 1; transform: translate(-50%, -50%); transition: transform .26s var(--md-ease), opacity .2s; }
  .md-dw.md-dw-c.has-side { width: min(calc(var(--md-dw) + var(--md-side)), calc(100vw - 48px)); }
}
.md-dw-head { flex: none; padding: 12px 16px 20px 24px; border-bottom: 1px solid var(--c-select); }
.md-dw-nav { display: flex; align-items: center; justify-content: space-between; min-height: 30px; margin-bottom: 10px; }
.md-dw-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.md-dw-who { min-width: 0; }
.md-dw-id h2 { margin: 0; text-align: start; font-size: var(--fs-title); font-weight: var(--fw-semibold); line-height: 1.25; letter-spacing: -.02em; color: var(--c-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-dw-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 5px; font-size: var(--fs-hint); color: var(--c-muted); }
.md-dw-sub .badge { font-size: var(--fs-hint); padding: 2px 9px; }
.md-dw-acts { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.md-cbtn { height: 32px; padding: 0 12px 0 10px; border-radius: var(--r-md); display: inline-flex; align-items: center; gap: 7px; border: 1px solid; font-size: var(--fs-table); font-weight: var(--fw-semibold); text-decoration: none; white-space: nowrap; transition: background .15s; }
.md-cbtn.call { color: #1d4bb8; border-color: #cfdcfb; background: #eef3ff; }
.md-cbtn.call:hover { background: #dfe8ff; }
.md-cbtn.wa { color: #0b7444; border-color: #bfe3cf; background: var(--c-success-soft); }
.md-cbtn.wa:hover { background: #d9f1e4; }
/* "Open lead": a clear outlined button with an arrow, pushed to the right of the round Call / WhatsApp icons (Sami 2026-11-08). */
.md-cbtn.open { height: 30px; margin-inline-start: auto; padding: 0 11px 0 13px; border-color: var(--c-line-strong); background: var(--c-card); color: var(--c-ink); transition: background .15s, border-color .15s; }
.md-cbtn.open svg { flex: none; color: var(--c-muted); transition: transform .2s, color .15s; }
.md-cbtn.open:hover { background: var(--c-select); border-color: var(--c-ink); }
.md-cbtn.open:hover svg { color: var(--c-ink); transform: translate(1px, -1px); }
.md-cbtn.open:focus-visible { outline: 2px solid var(--c-btn); outline-offset: 2px; }
.md-dw-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 16px 24px 24px; }
/* Today's log form inside the drawer: no card frame, full width. */
.md-dw .logact { margin: 0; border: 0; box-shadow: none; background: none; }
.md-dw .logact > .panel-head { padding: 0 0 8px; border: 0; }
.md-dw .logact > .panel-body { padding: 0; }
.md-dw .logact > .panel-head [data-la-close] { display: none; }
/* The log's Save bar sits flush at the bottom of the drawer (sticky inside the scrolling body). */
.md-dw-body:has(.logact) { padding-bottom: 0; }
.md-dw .la-foot { margin: 24px -24px 0; padding: 14px 24px 16px; }

@media (max-width: 720px) {
  .md-search { flex-basis: 100%; max-width: none; }
  .md-fscrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(28, 27, 37, .32); }
  .md-fpanel { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 56; width: auto; max-width: none; height: 84dvh; border: 0; border-radius: 20px 20px 0 0; animation: mdFup .26s var(--md-ease); }
  .md-fhead { padding: 14px 10px 6px 18px; }
  .md-fdd-btn { height: 48px; }
  .md-fdd-list .md-fo { min-height: 44px; }
  .md-ffoot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
  body.md-fs-open { overflow: hidden; }
  .md-grp-h .hint { display: none; }
  .md-row { gap: 0; padding-inline-end: 10px; }
  .md-open { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; padding: 13px 4px 13px 14px; }
  .md-av, .md-ty { width: 38px; height: 38px; font-size: var(--fs-hint); }
  .md-ty svg { width: 19px; height: 19px; }
  .md-due small, .md-top .badge, .md-row .md-act.wa { display: none; }
  .md-due b { font-size: var(--fs-hint); }
  .md-dw { top: auto; left: 0; width: auto; height: calc(100dvh - 10px); border-radius: 20px 20px 0 0; transform: translateY(105%); }
  .md-dw.open { transform: none; }
  .md-dw-head { padding: 8px 12px 16px 16px; }
  .md-dw-body { padding: 12px 16px calc(20px + env(safe-area-inset-bottom)); }
  .md-dw .la-foot { margin: 20px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  body.md-dw-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .md-page, .md-dw, .md-dw.open, .md-scrim, .md-act, .md-row, .md-fdd-btn .ico { transition: none; }
  .md-fdd-box { animation: none; }
  .md-fpanel { animation: none; }
  .md-act:hover, .md-act:active { transform: none; }
}

/* ---- after the call (js/afterCall.js, prototype .prompt / .lr-badge): "How did it go?" card, "Log the call" badge, "N to log" chip ---- */
.ac-card { position: fixed; right: 24px; bottom: 24px; z-index: 45; width: 396px; max-width: calc(100vw - 32px); background: var(--c-card); border: 1px solid var(--c-line); border-radius: 20px; box-shadow: 0 24px 60px -18px rgba(28, 27, 37, .38), 0 2px 6px rgba(28, 27, 37, .06); overflow: hidden; opacity: 0; transform: translateY(18px) scale(.98); pointer-events: none; transition: opacity .22s, transform .34s var(--md-ease), right .34s var(--md-ease); }
.ac-card.show { opacity: 1; transform: none; pointer-events: auto; }
@media (min-width: 1280px) { body.md-dw-open:not(.md-dw-modal) .ac-card { right: calc(var(--md-dw) + 24px); } }
.ac-top { display: flex; align-items: center; gap: 12px; padding: 14px 10px 10px 16px; }
.ac-top .md-av { width: 38px; height: 38px; font-size: var(--fs-hint); }
.ac-who { flex: 1; min-width: 0; }
.ac-who b { display: block; font-size: var(--fs-body); font-weight: var(--fw-semibold); letter-spacing: -.01em; color: var(--c-ink); }
.ac-who span { display: block; margin-top: 1px; font-size: var(--fs-hint); color: var(--c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-outs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 4px 16px 16px; }
.ac-o { --oc: var(--la-o-gray); min-height: 86px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 12px 6px 10px; border: 1px solid var(--la-hair); border-radius: var(--r-lg); background: var(--c-card); font: inherit; text-align: center; cursor: pointer; transition: transform .18s var(--md-ease), box-shadow .18s, border-color .18s, background .18s; }
.ac-o.o-green { --oc: var(--la-o-green); } .ac-o.o-red { --oc: var(--la-o-red); } .ac-o.o-orange { --oc: var(--la-o-orange); } .ac-o.o-rose { --oc: var(--la-o-rose); }
.ac-o.o-plum { --oc: var(--la-o-plum); } .ac-o.o-slate { --oc: var(--la-o-slate); } .ac-o.o-gold { --oc: var(--la-o-gold); } .ac-o.o-teal { --oc: var(--la-o-teal); }
.ac-o-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--oc); background: color-mix(in srgb, var(--oc) 11%, var(--c-card)); transition: background .18s; }
.ac-o b { font-size: var(--fs-hint); font-weight: var(--fw-semibold); line-height: 1.2; color: var(--c-ink); }
.ac-o:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--oc) 35%, var(--c-card)); background: color-mix(in srgb, var(--oc) 4%, var(--c-card)); box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--oc) 60%, transparent); }
.ac-o:hover .ac-o-ic { background: color-mix(in srgb, var(--oc) 17%, var(--c-card)); }
.ac-o:active { transform: scale(.97); }
.ac-o:focus-visible { outline: 2px solid var(--oc); outline-offset: 2px; }
.ac-foot { display: flex; align-items: center; gap: 8px; padding: 9px 12px 9px 16px; border-top: 1px solid var(--c-line); background: var(--c-tile); }
.ac-later { display: inline-flex; align-items: center; gap: 6px; padding: 6px 4px; border: 0; background: transparent; font: inherit; font-size: var(--fs-hint); font-weight: var(--fw-semibold); color: var(--c-muted); cursor: pointer; }
.ac-later:hover { color: var(--c-ink); }
.ac-open { margin-inline-start: auto; height: 32px; padding: 0 12px; border: 0; border-radius: var(--r-md); background: var(--c-btn); color: var(--c-card); font: inherit; font-size: var(--fs-hint); font-weight: var(--fw-semibold); white-space: nowrap; cursor: pointer; }
.ac-open:hover { background: var(--c-btn-hover); }
.ac-later:focus-visible, .ac-open:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 2px; }

.ac-slot:empty { display: none; }
.ac-badge { display: inline-flex; align-items: center; height: 28px; border-radius: var(--r-pill); background: var(--c-warning-soft); color: var(--c-warning); animation: acIn .4s var(--md-ease); }
.ac-badge button { height: 100%; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.ac-badge-go { display: inline-flex; align-items: center; gap: 5px; padding: 0 4px 0 10px; font-size: var(--fs-hint); font-weight: var(--fw-semibold); white-space: nowrap; border-radius: var(--r-pill) 0 0 999px; }
.ac-badge-x { width: 26px; padding: 0 8px 0 2px; font-size: var(--fs-body); line-height: 1; border-radius: 0 999px 999px 0; opacity: .7; }
.ac-badge:hover { background: #fbe9c6; }
.ac-badge-x:hover { opacity: 1; }
.ac-badge button:focus-visible { outline: 2px solid var(--c-warning); outline-offset: -2px; }
.md-row:has(.ac-slot:not(:empty)) { grid-template-columns: minmax(0, 1fr) auto auto; }
/* "N to log" in the toolbar: the row's "Log the call ×" look at toolbar height (Sami 2026-11-14). Tap = show only these (on = filled,
   like a picked board card); × = dismiss them all. */
.md-tolog { height: 34px; border: 1px solid var(--c-warning-line); animation: none; }
.md-tolog .ac-badge-go { padding-inline: 12px 4px; font-size: var(--fs-table); }
.md-tolog .ac-badge-go .ico { width: 14px; height: 14px; }
.md-tolog .ac-badge-x { width: 30px; }
.md-tolog.on { background: var(--c-warning); border-color: var(--c-warning); color: var(--c-card); }
.md-tolog.on:hover { background: color-mix(in srgb, var(--c-warning) 85%, #000); }
.ac-tolog:empty { display: none; }
@keyframes acIn { from { opacity: 0; transform: scale(.9); } }

@media (max-width: 720px) {
  .ac-card { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; max-width: none; }
  .md-row:has(.ac-slot:not(:empty)) { grid-template-columns: minmax(0, 1fr) auto; }
  .md-row .ac-slot { grid-row: 2; grid-column: 1 / -1; justify-self: start; margin: -8px 0 12px 62px; }
}
@media (prefers-reduced-motion: reduce) {
  .ac-card, .ac-o, .ac-o-ic { transition: none; }
  .ac-o:hover, .ac-o:active { transform: none; }
  .ac-badge { animation: none; }
}

/* "Last feedback" strip (public/js/recentFeedback.js, Bahaa 2026-11-05): the last 3 logs with feedback, under the name in the log drawer and on the lead page */
.rfb { margin-top: 14px; padding: 10px 12px 12px; border: 1px solid var(--c-select-line); border-radius: var(--r-lg); background: linear-gradient(180deg, var(--c-select), var(--c-card) 70%); }
.rfb.rfb-wait { display: none; }
.rfb-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: var(--fs-hint); font-weight: var(--fw-semibold); letter-spacing: .06em; text-transform: uppercase; color: var(--c-text); }
.rfb-none { margin: 0; font-size: var(--fs-hint); color: var(--c-faint); }
.rfb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rfb-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; }
.rfb-row + .rfb-row { padding-top: 6px; border-top: 1px dashed var(--c-select-line); }
.rfb-when { display: inline-flex; align-items: center; gap: 6px; min-width: 92px; padding-top: 2px; font-size: var(--fs-hint); color: var(--c-muted); white-space: nowrap; }
.rfb-when b { font-weight: var(--fw-semibold); }
.rfb-when .md-ty { width: 22px; height: 22px; }
.rfb-when .md-ty svg { width: 12px; height: 12px; }
.rfb-chips { display: flex; flex-wrap: wrap; gap: 4px 6px; justify-content: flex-start; min-width: 0; }
.rfb-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--md-font-ar, var(--font)); font-size: var(--fs-hint); font-weight: var(--fw-medium); color: var(--c-text); background: var(--c-card); border: 1px solid var(--c-select-line); border-radius: var(--r-pill); padding: 2px 10px; }
.lead-id .rfb { max-width: 640px; }
@media (max-width: 640px) {
  .rfb-row { grid-template-columns: 1fr; gap: 4px; }
  .rfb-when { min-width: 0; }
}

/* My day: Group by (the shared panel, button only), its chip and the nested groups of follow-ups */
#mdGslot, .md-gslot, .md-gslot .fx, .md-gslot .fx-bar, .md-gslot .fx-tools { display: contents; }
.md-gslot .fx-tool { flex: none; height: 36px; padding: 0 12px; gap: 7px; border-color: var(--c-line); font-size: var(--fs-table); }
.md-gslot .fx-tool .ico { color: var(--c-muted); }
.md-gslot .fx-tool.on { border-color: var(--c-select-line); background: var(--c-select); color: var(--c-text); }
.md-gslot .fx-tool.on .ico { color: var(--c-ink); }
.md-gslot .fx-tool:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 2px; }
/* Group by bands are the shared look (filterbar.css); the late count in each band stays red as a warning. */
.md-list .grp-agg { color: var(--c-danger); }
.md-list .grp-leaf > .md-lst { margin: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }

/* My day: the rows of the stuck tabs (Payment due, Approval delayed; css/myday-tabs.css lays out the tabs) */
.mo-row { border-top: 1px solid var(--c-select); }
.mo-row:first-child { border-top: 0; }
.mo-link { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(90px, auto) auto; align-items: center; gap: 12px; padding: 12px 16px; color: inherit; text-decoration: none; }
.mo-link:hover { background: var(--c-page); }
.mo-main { display: grid; gap: 2px; min-width: 0; }
.mo-sub, .mo-ops { font-size: var(--fs-hint); color: var(--c-faint); }
.mo-go { font-size: var(--fs-hint); font-weight: var(--fw-semibold); color: var(--c-ink); }
@media (max-width: 640px) { .mo-go { display: none; } }

/* My day: the question after a cancelled offer, two answers (S3c) */
.mo-q { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3, 12px); padding: var(--sp-3, 12px) var(--sp-4, 16px); border-top: 1px solid var(--c-select); }
.mo-q:first-child { border-top: 0; }
.mo-q-main { display: grid; gap: 2px; min-width: 0; }
.mo-q-acts { display: flex; flex-wrap: wrap; gap: var(--sp-2, 8px); justify-content: flex-end; }
@media (max-width: 640px) { .mo-q { grid-template-columns: minmax(0, 1fr); } .mo-q-acts { justify-content: flex-start; } }
