/* Soft orbits 01–05: shared quiet circles, one surface for each event type. */
.daily-digest{position:fixed;right:22px;bottom:max(20px,env(safe-area-inset-bottom));z-index:90;width:374px;max-width:calc(100vw - 24px);max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);display:flex;flex-direction:column;font-family:inherit;color:#152e49;pointer-events:none}
.daily-digest *{box-sizing:border-box}.daily-digest button{font-family:inherit;cursor:pointer}.daily-digest button:focus-visible{outline:2px solid #aeF2d4;outline-offset:-3px}.daily-digest [hidden]{display:none!important}
.daily-digest-cards{overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;min-height:0;padding:5px 7px 0;pointer-events:auto}
.daily-digest-slot{display:grid;grid-template-rows:1fr;margin-bottom:5px;opacity:1;transform:translateX(0);transition:grid-template-rows .32s ease,margin-bottom .32s ease,opacity .24s ease,transform .28s ease}
.daily-digest-slot.is-waiting{visibility:hidden;opacity:0;pointer-events:none;animation:none;transition:none}
.daily-digest-slot.is-entering{animation:digest-card-in .18s cubic-bezier(.2,.8,.25,1) both}
.daily-digest-card-clip{min-height:0;overflow:hidden;padding-top:2px;padding-bottom:2px}
.daily-digest-card{--digest-bg:linear-gradient(115deg,#237a87,#2a7d87 58%,#177e8b);--digest-orbit:#b4edf226;--digest-glow:#9ce8e51c;--digest-highlight:#aef2d4;--digest-ink:#102e49;position:relative;padding:8px 10px 9px;border:1.5px solid #187581;border-radius:13px;background:var(--digest-bg);backdrop-filter:none;-webkit-backdrop-filter:none;color:#fff;box-shadow:0 4px 12px #173d681a,inset 0 1px 0 #ffffff40}
.daily-digest-item{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px 7px;width:100%;padding:0;border:0;background:transparent;text-align:left;color:inherit;font:inherit;line-height:1.3}
.daily-digest-date{position:static;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:4px;min-height:23px;padding:3px 7px;border-radius:6px;background:#fff;color:#163650;line-height:1}
.daily-digest-date strong{font-size:13px;font-weight:700}.daily-digest-date span{font-size:10px;font-weight:600;text-transform:uppercase}
.daily-digest-meta{display:flex;align-items:center;min-width:0;margin-right:21px;font-size:10px;font-weight:500;color:#fff;line-height:1.2}
.daily-digest-meta>span{padding:3px 5px;border-radius:5px;background:#ffffff14}
.daily-digest-subject{grid-column:1/-1;display:block;width:fit-content;max-width:100%;padding:2px 6px;border-radius:6px;background:#fff;font-size:16px;font-weight:650;line-height:1.2;color:#142e49;letter-spacing:.1px;overflow-wrap:anywhere}
.daily-digest-action{grid-column:1/-1;display:block;width:fit-content;max-width:100%;border-radius:4px;padding:2px 5px;font-size:12px;line-height:1.25;font-weight:600;background:var(--digest-highlight);color:var(--digest-ink);overflow-wrap:anywhere}
.daily-digest-client{grid-column:1/-1;display:block;font-size:11px;line-height:1.25;font-weight:400;color:#fff;overflow-wrap:anywhere}
.daily-digest-close{position:absolute;right:4px;top:5px;display:grid;place-items:center;width:28px;height:28px;padding:6px;border:0;border-radius:7px;background:transparent;color:#fff;z-index:1}.daily-digest-close:hover{background:#ffffff26;color:#fff}.daily-digest-close svg{width:15px;height:15px}
.daily-digest-calendar{align-self:flex-end;display:flex;align-items:center;gap:7px;flex:none;margin:0 7px;padding:6px 10px;border:1px solid #dbe5ef;border-radius:8px;background:#fffffff2;color:#345b82;font-size:11px;box-shadow:0 3px 12px #193b5c0d;pointer-events:auto}.daily-digest-calendar svg{width:14px;height:14px}
.daily-digest-slot.is-leaving{animation:none;grid-template-rows:0fr;margin-bottom:0;opacity:0;transform:translateX(38px);pointer-events:none}
@keyframes digest-card-in{from{opacity:0;visibility:hidden;transform:translateX(calc(100% + 32px))}to{opacity:1;visibility:visible;transform:translateX(0)}}
@media(max-width:600px){.daily-digest{right:5px;bottom:max(12px,env(safe-area-inset-bottom));width:374px;max-width:calc(100vw - 10px);max-height:calc(100dvh - 24px)}.daily-digest-card{padding:8px 10px 9px}.daily-digest-subject{font-size:16px}body.has-daily-digest #toast.show{bottom:auto;top:max(12px,env(safe-area-inset-top))}}
@media(prefers-reduced-motion:reduce){.daily-digest-slot,.daily-digest-slot.is-entering{animation:none;transition:none}}
.daily-digest-card-clip{transition:padding .32s ease}
.daily-digest-slot.is-leaving .daily-digest-card-clip{padding-top:0;padding-bottom:0}
@media(prefers-reduced-motion:reduce){.daily-digest-card-clip{transition:none}}

/* Notification stack only: keep native scrolling, hide its visual scrollbar. */
.daily-digest .daily-digest-cards{scrollbar-width:none!important;-ms-overflow-style:none;scrollbar-gutter:auto}
.daily-digest .daily-digest-cards::-webkit-scrollbar{display:none;width:0;height:0}

/* Distinct evidence statuses: one badge per changed domain. */
.daily-digest-statuses{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:4px;min-width:0}
.daily-digest-statuses .daily-digest-action{display:flex;align-items:baseline;gap:5px;border:1px solid #ffffff40;box-shadow:0 1px 2px #00363d1a}
/* Calendar colours: kind identifies the task; evidence/urgency overrides it. */
.daily-digest-action{--digest-highlight:#dcecff;--digest-ink:#173f70}
.daily-digest-action.task-verification{background:#86cdf3;color:#000}
.daily-digest-action.task-crypto{background:#d8c9f0;color:#000}
.daily-digest-action.task-mcd{background:#cdb4f2;color:#000}
.daily-digest-action.status-completed{background:#edf8f2;color:#126d4c}
.daily-digest-action.status-missing,
.daily-digest-action.status-regressed{background:#f5ce7c;color:#47330c}
.daily-digest-action.status-expired,
.daily-digest-action.status-required{background:#c43f57;color:#fff}
.daily-digest-status{display:flex;flex-direction:column;align-items:flex-start;gap:2px;max-width:100%;min-width:0}
.daily-digest-timing{display:block;padding:0 1px;margin:0;background:none;border:0;box-shadow:none;color:#fff;font-size:11px;line-height:1.25;font-weight:400}

/* Selected NKM 15: confirmed replacement only; compact live text, vector art. */
.daily-digest-card.nkm-replaced{background:linear-gradient(115deg,#143d61,#215a7b);--digest-orbit:#82b9de2b;--digest-glow:#559ccc1a;border-color:#245574;overflow:hidden;isolation:isolate}
.daily-digest-card::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 78% 50%,var(--digest-glow),transparent 68%),repeating-radial-gradient(circle at calc(100% - 34px) 50%,transparent 0 29px,var(--digest-orbit) 30px 31px,transparent 32px 59px)}
:is(.nkm-replaced,.tachograph-replaced) .task-crypto.status-completed{background:#adf1d2;color:#084c3f;border-color:#adf1d2}

.daily-digest-action.task-tachograph{background:#dcecff;color:#173f70}

/* Variant 10: emerald to turquoise, matching the NKM card geometry. */
.daily-digest-card.tachograph-replaced{background:linear-gradient(115deg,#006d59,#087e80);--digest-orbit:#a4e9d82b;--digest-glow:#75d8ba1a;border-color:#087b79;overflow:hidden;isolation:isolate}
.tachograph-replaced .task-tachograph{background:#d5f1fa;color:#123f50}

/* Align the visible card edges with the calendar side panel; account for stack padding. */
@media(min-width:1200px){.daily-digest{width:calc(clamp(300px,24vw,360px) + 14px);right:calc(var(--page-gutter,22px) - 7px)}}

/* One shared decorative check; the full card width remains available to statuses. */
.daily-digest-check{position:absolute;top:8px;right:38px;width:24px;height:24px;display:block;color:#adf1d2;pointer-events:none}
.daily-digest-check svg{display:block;width:100%;height:100%}
.daily-digest-meta{margin-right:55px}
.daily-digest-statuses{width:100%;max-width:100%;align-items:flex-start}
.daily-digest-action.task-tachograph,.daily-digest-action.task-crypto.status-completed{white-space:nowrap}

/* Current vehicle problems override every successful-work colour theme. */
.daily-digest-card.has-problem:not(.is-upcoming){background:linear-gradient(115deg,#fff3f6,#fce5ec);--digest-orbit:#df8ca426;--digest-glow:#efabc21a;border-color:#e9bdca;color:#52333e;overflow:hidden;isolation:isolate}
.daily-digest-alert{position:absolute;top:8px;right:38px;width:24px;height:24px;display:block;color:#fff1dc;pointer-events:none}
.daily-digest-alert svg{display:block;width:100%;height:100%}

/* Soft rose problem surface: retain readable text and controls. */
.has-problem .daily-digest-client,.has-problem .daily-digest-timing,.has-problem .daily-digest-meta{color:#633b49}
.has-problem .daily-digest-meta>span{background:#ffffff80}
.has-problem .daily-digest-close{color:#8d3b50}
.has-problem .daily-digest-close:hover{background:#eec4ce;color:#64283a}
.has-problem .daily-digest-alert{color:#b74b65}
.has-problem button:focus-visible{outline-color:#9c2941}

/* Larger, lighter marks share a dedicated right column and vertical centre. */
.daily-digest-card{padding-right:66px;min-height:0;overflow:hidden;isolation:isolate}
.daily-digest-check,.daily-digest-alert{top:50%;right:10px;width:48px;height:48px;transform:translateY(-50%)}
.daily-digest-meta{margin-right:0}

/* Slightly stronger alert; keep its centre aligned with the check column. */
.daily-digest-alert{width:52px;height:52px;right:8px}

/* Upcoming notifications: white paper with the shared subtle circle pattern. */
.daily-digest-card.is-upcoming{--digest-bg:#fff;--digest-orbit:#b4cde94d;--digest-glow:#c8e0f41c;background:#fff;backdrop-filter:none;-webkit-backdrop-filter:none;border-color:#b9cee3;color:#173d62}
.is-upcoming .daily-digest-date{background:#fff;color:#173d62}
.is-upcoming .daily-digest-client,.is-upcoming .daily-digest-timing,.is-upcoming .daily-digest-meta{color:#48627c}
.is-upcoming .daily-digest-close{color:#537493}
.is-upcoming .daily-digest-close:hover{background:#eaf3fc;color:#173d62}
.is-upcoming .daily-digest-check{color:#269b7e}
.is-upcoming button:focus-visible{outline-color:#527da7}

/* White date and plate tiles match the selected reference without changing layout. */
.daily-digest-date,.daily-digest-subject{box-shadow:0 1px 3px #102e4912}

/* Tighter text rhythm; font sizes and line heights stay unchanged. */
.daily-digest-item{row-gap:2px}
.daily-digest-statuses{gap:2px 4px}
.daily-digest-status{gap:1px}
.daily-digest-subject{padding-top:1px;padding-bottom:1px}
.daily-digest-statuses .daily-digest-action{padding-top:1px;padding-bottom:1px}
