/* profile 2026-10-16: My profile page, avatars, department badges, header menu, dark theme (kill switch meta flag_dark_theme) */
.dbadge{--bc:#667085;display:inline-flex;align-items:center;gap:4px;max-width:100%;padding:1px 8px 1px 6px;border-radius:999px;font-size:11.5px;font-weight:600;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;
 color:color-mix(in srgb,var(--bc) 82%,#000);background:color-mix(in srgb,var(--bc) 11%,#fff);border:1px solid color-mix(in srgb,var(--bc) 32%,#fff)}
.dbadge .ico{width:12px;height:12px;vertical-align:0;stroke-width:2.2}
.dbadge.c{padding:0 5px;font-size:10.5px;line-height:15px;gap:3px}.dbadge.c .ico{width:10px;height:10px}
.pav{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--navy);color:#fff;font-size:10px;font-weight:700;flex:none;vertical-align:middle;margin-right:5px;overflow:hidden;object-fit:cover}
img.pav{background:#e4e7ec}.pdeco{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap;max-width:100%}.pdeco .dbadge{margin-left:2px}
.topbar .avatar{overflow:hidden}.topbar img.avatar{object-fit:cover;background:#e4e7ec}
/* header identity menu */
.topbar .whomenu{position:relative;z-index:30;flex:none;overflow:visible!important}.whomenu>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;border-radius:8px;padding:2px 6px 2px 2px}
.whomenu>summary::-webkit-details-marker{display:none}.whomenu>summary:hover{background:#f2f4f7}.whomenu>summary:focus-visible{outline:2px solid var(--blue)}
.who-dd{position:absolute;right:0;top:calc(100% + 6px);min-width:210px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 32px rgba(0,0,0,.15);z-index:3000;padding:6px 0}
.who-dd a,.who-dd button{display:flex;width:100%;align-items:center;gap:8px;padding:8px 14px;font:inherit;font-size:13.5px;color:var(--ink);background:none;border:0;cursor:pointer;text-align:left}
.who-dd a:hover,.who-dd button:hover{background:#f5f8ff;text-decoration:none}.who-dd form{margin:0}.who-dd hr{border:0;border-top:1px solid var(--line);margin:4px 0}
@media(max-width:860px){.who-dd{position:fixed;right:12px;top:56px}}
/* profile page */
.pf-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.pf-grid .panel{margin:0}
@media(max-width:900px){.pf-grid{grid-template-columns:minmax(0,1fr)}}
.pf-me{display:flex;gap:16px;align-items:center;margin:6px 0 12px;min-width:0}.pf-id{display:flex;flex-direction:column;min-width:0;gap:2px}.pf-id>*{overflow-wrap:anywhere}
.pf-av{width:96px;height:96px;border-radius:50%;flex:none;object-fit:cover;background:#e4e7ec}.pf-ini{display:grid;place-items:center;background:var(--navy);color:#fff;font-size:32px;font-weight:700}
.pf-name{font-size:17px}.pf-badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.pf-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}.pf-wide{grid-column:1/-1}@media(max-width:520px){.pf-form{grid-template-columns:minmax(0,1fr)}}
.pf-ro{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;margin:14px 0 4px;padding:10px 12px;background:var(--bg);border-radius:8px}.pf-ro dt{font-size:11.5px;color:var(--mut)}.pf-ro dd{margin:0;font-weight:600;overflow-wrap:anywhere}
.pf-tg{display:flex;gap:10px;align-items:flex-start;font-weight:400;margin:0 0 10px;cursor:pointer}.pf-tg input{width:18px;height:18px;margin:2px 0 0;flex:none}.pf-tg span{display:flex;flex-direction:column}.pf-tg small{color:var(--mut);font-size:12px}
.pf-photo-f label{margin-top:0}
.okmsg{background:var(--grnbg);color:var(--grn);border-radius:8px;padding:8px 12px}
/* ---------- dark theme ---------- */
html[data-theme=dark]{color-scheme:dark;--ink:#e6ebf2;--mut:#a3adbd;--line:#2c3646;--bg:#0f1520;--card:#18202d;--navy:#9cc3f5;--navy2:#24324a;--blue:#7cb6ff;
 --red:#ff9a8f;--redbg:#3b1d1b;--amb:#f5c46b;--ambbg:#3a2c12;--grn:#6fdc9f;--grnbg:#123323;--sh:0 1px 2px rgba(0,0,0,.4)}
html[data-theme=dark] body{background:var(--bg);color:var(--ink)}
html[data-theme=dark] .sidebar{background:#0b1220}html[data-theme=dark] .sidebar .logo{background:#e9eef6}
html[data-theme=dark] .sidebar nav a.on{background:#1f3b63}html[data-theme=dark] .sidebar nav a:hover{background:#18263b}
html[data-theme=dark] .topbar{background:#141b27;border-color:var(--line)}
html[data-theme=dark] .apptitle,html[data-theme=dark] h1,html[data-theme=dark] h3,html[data-theme=dark] .sec{color:#cfe0f7}
html[data-theme=dark] .avatar,html[data-theme=dark] .pav,html[data-theme=dark] .pf-ini{background:#2d5a92;color:#fff}
html[data-theme=dark] :is(.card,.panel,.tile,.today,.stage,.filters,table,.bell-dd,.who-dd,.kpi-card,.gs-box,.mn-win,details.bell .bell-dd){background:var(--card);color:var(--ink)}
html[data-theme=dark] th{background:#1f2938;color:#c3ccda}html[data-theme=dark] tbody tr:hover td{background:#1c2636}
html[data-theme=dark] :is(th,td){border-color:var(--line)}
html[data-theme=dark] :is(input,select,textarea){background:#0f1622;color:var(--ink);border-color:#3a475b}
html[data-theme=dark] label{color:#c9d2df}
html[data-theme=dark] .btn{background:#1f2938;color:var(--ink);border-color:#3a475b}html[data-theme=dark] .btn:hover{background:#2a3647}
html[data-theme=dark] .primary{background:#2f6fca;border-color:#2f6fca;color:#fff}html[data-theme=dark] .primary:hover{background:#3a7fe0}
html[data-theme=dark] .ok{background:#0f8a52;border-color:#0f8a52;color:#fff}html[data-theme=dark] .bad{background:#c4321f;border-color:#c4321f;color:#fff}
html[data-theme=dark] .chip{background:#1b2433;color:var(--ink)}html[data-theme=dark] .chip:hover{background:#223047}
html[data-theme=dark] .chip.red{background:#2c1a1c}html[data-theme=dark] .chip.amber{background:#2c2415}
html[data-theme=dark] .ti,html[data-theme=dark] .date,html[data-theme=dark] .count{background:#1f3350;color:#cfe0f7}
html[data-theme=dark] .tc{background:#2d5a92}html[data-theme=dark] .tile.locked{background:#151c27;border-color:#334}
html[data-theme=dark] .bell-i{border-color:var(--line)}html[data-theme=dark] .bell-i:hover,html[data-theme=dark] .who-dd a:hover,html[data-theme=dark] .who-dd button:hover{background:#1f2b3d}
html[data-theme=dark] .bell-i.unread{background:#17263d}html[data-theme=dark] .whomenu>summary:hover{background:#1f2938}
html[data-theme=dark] .dbadge{color:color-mix(in srgb,var(--bc) 35%,#fff);background:color-mix(in srgb,var(--bc) 28%,#121a26);border-color:color-mix(in srgb,var(--bc) 55%,#121a26)}
html[data-theme=dark] .site-footer{background:transparent;color:var(--mut)}
html[data-theme=dark] .err{color:#ffb4ab}html[data-theme=dark] code,html[data-theme=dark] pre{background:#1f2938;color:var(--ink)}
html[data-theme=dark] #aticker .at-sum{background:#2a1517;border-color:#6b2a2a;color:#ffb4ab}
/* pale inline banners/cards keep their light background: force dark text inside them so contrast stays */
html[data-theme=dark] [style*="background:#f"],html[data-theme=dark] [style*="background: #f"],html[data-theme=dark] [style*="background:#e"],html[data-theme=dark] [style*="background:#d"]{color:#1d2939}
html[data-theme=dark] [style*="background:#f"] a,html[data-theme=dark] [style*="background:#e"] a{color:#1554a0}
html[data-theme=dark] [style*="background:#fff;"],html[data-theme=dark] [style*="background:#fff\""],html[data-theme=dark] [style*="background:white"]{background:var(--card)!important;color:var(--ink)}
/* footerdark 2026-10-17 (Michael): dark-theme footer contrast: white logo, light Grok/xAI marks, readable links + build tag (WCAG AA on #0f1520) */
html[data-theme=dark] .site-footer{color:#c3cad6;border-top-color:var(--line)}
html[data-theme=dark] .site-footer .sf-logo{filter:none;opacity:1;background:#fff;padding:3px 6px;border-radius:6px;box-sizing:content-box}
html[data-theme=dark] .site-footer .sf-links a{color:#dbe2ec;border-left-color:#3a4658}
html[data-theme=dark] .site-footer .sf-links a:hover{color:#fff}
html[data-theme=dark] .site-footer .sf-pw,html[data-theme=dark] .site-footer .sf-pw svg,html[data-theme=dark] .site-footer .sf-ultra{color:#e6ebf2}
html[data-theme=dark] .site-footer .sf-v{color:#a3adbd;border-left-color:#3a4658}
html[data-theme=dark] .closenav{color:var(--ink)}
/* contrast2 dark 2026-10-17 */
html[data-theme=dark] .mday.other .dnum,html[data-theme=dark] .es.e-unknown,html[data-theme=dark] .es.e-na,html[data-theme=dark] .arrow{color:#a3adbd}
html[data-theme=dark] .locked-btn{background:#1f2937;color:#c3cad6;border-color:#4b5563}
/* contrast4 dark 2026-10-17: doc-check drop zone and content-calendar spill days in dark mode */
html[data-theme=dark] .dc-drop{background:#1f2937;border-color:#4b5563;color:var(--ink)}
html[data-theme=dark] .dc-drop.over{background:#172a4a;border-color:#7cb6ff}
html[data-theme=dark] .cal td.out{background:#111827;color:#a3adbd}
/* qa1017: dark sidebar logo block (was a white slab); logo keeps a white chip so it stays legible */
html[data-theme=dark] .sidebar .logo.logo{background:#0b1220;border-bottom:1px solid #1f2a3d}
html[data-theme=dark] .sidebar .logo img{background:#fff;padding:4px 8px;border-radius:8px;box-sizing:content-box;height:34px}
/* qa1017: 'Total ABC in pipeline' tile, dark */
html[data-theme=dark] .page-head .kpi.abc-total-card{background:linear-gradient(135deg,#1e3a8a,#172554);border-color:#2b4a9e;color:#fff}
html[data-theme=dark] .page-head .kpi.abc-total-card span,html[data-theme=dark] .page-head .kpi.abc-total-card small{color:#dbeafe}
html[data-theme=dark] .page-head .kpi.abc-total-card b{color:#fff}
/* qa1017 dark contrast */
html[data-theme=dark] .ok,html[data-theme=dark] .btn.ok{background:#067647;border-color:#067647;color:#fff}
html[data-theme=dark] tr[style*="#fff1e6"]{background:#3a2412!important}html[data-theme=dark] tr[style*="#fff1e6"] .muted{color:#d0d5dd}
html[data-theme=dark] body.auth{background:#0b1220}
html[data-theme=dark] .mcell span[style*="b42318"]{color:#fda29b!important}
html[data-theme=dark] a.reflink{color:#93c5fd}
html[data-theme=dark] .flow .fs li.bad .h,html[data-theme=dark] .flow .fs li.bad .h span:not(.d){color:#fecaca}
html[data-theme=dark] .lotbid .btn.lb-yes{background:transparent;color:#6ce9a6;border-color:#6ce9a6}html[data-theme=dark] .lotbid .btn.lb-no{background:transparent;color:#fda29b;border-color:#fda29b}
html[data-theme=dark] a.btn.primary,html[data-theme=dark] .btn.sm.primary{background:#2563eb;border-color:#2563eb;color:#fff}

/* emoji avatar 2026-10-28 (Michael Maxwell): emoji instead of the photo/initials. Native emoji fonts first, bundled Noto fallback ("QD Emoji", local) */
.avatar-e,.pav-e,.pf-emo,.pf-emo-prev,.has-e,.mav,.qp-av.has-e{font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","QD Emoji"}
.avatar.avatar-e{background:#e4e7ec;font-size:18px;font-weight:400;line-height:1;color:#101828}
.pav.pav-e{background:#e4e7ec;font-size:14px;font-weight:400;line-height:1;color:#101828}
.pf-av.pf-emo{display:grid;place-items:center;font-size:54px;line-height:1;font-weight:400;background:#e4e7ec;color:#101828}
.mav{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#e4e7ec;color:#101828;font-size:14px;line-height:1;font-weight:400;margin-right:6px;vertical-align:middle;flex:none}.mav:empty{display:none}
.qp-av.has-e{background:#e4e7ec;color:#101828;font-size:18px;font-weight:400}
.cd-av.has-e{background:#e4e7ec;color:#101828;font-size:20px;font-weight:400;line-height:34px}
button.mn-av.has-e,span.mn-av.has-e{background:#e4e7ec;color:#101828;font-size:26px;font-weight:400}span.mn-av.sm.has-e{font-size:17px}
.pf-emobox{margin-top:14px;padding-top:12px;border-top:1px solid var(--line,#e4e7ec)}.pf-emobox .pf-sub{margin:0 0 4px;font-size:14px}
.pf-emo-row{display:flex;align-items:center;gap:12px;margin:8px 0}
.pf-emo-prev{display:grid;place-items:center;width:64px;height:64px;border-radius:50%;background:#e4e7ec;color:#101828;font-size:36px;line-height:1;flex:none;overflow:hidden}
.pf-sw{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}.pf-sw button{width:28px;height:28px;border-radius:50%;border:2px solid #fff;background:var(--c,#e4e7ec);box-shadow:0 0 0 1px #98a2b3;cursor:pointer;padding:0}
.pf-sw button[aria-checked=true]{box-shadow:0 0 0 3px #1d4ed8}.pf-sw button:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}.pf-sw button:disabled{opacity:.5;cursor:not-allowed}
.pf-emo-clr{margin-top:8px}
html[data-theme=dark] .pf-sw button{border-color:#18202d}
