/* AMAADOR EHS studios — TV theme responsive layer (r3b). Loaded after ehs-tv.css. */
#ehs-cmd-app { max-width: 100%; }
#ehs-cmd-app .ec-main, #ehs-cmd-app .ec-card, #ehs-cmd-app .ec-kpi, #ehs-cmd-app .tv-sec, #ehs-cmd-app .r2-prof, #ehs-cmd-app .r2-dec { min-width: 0; }
#ehs-cmd-app .ec-tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
#ehs-cmd-app img, #ehs-cmd-app svg, #ehs-cmd-app canvas { max-width: 100%; }
#ehs-cmd-app .ec-brand { min-width: 0; }
#ehs-cmd-app .ec-brand > div:last-child { min-width: 0; }
#ehs-cmd-app .ec-brand-title, #ehs-cmd-app .ec-brand-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- tablet ---------- */
@media (max-width: 1080px) {
  #ehs-cmd-app .ec-shell { grid-template-columns: 220px minmax(0, 1fr); }
  #ehs-cmd-app .ec-nav-btn { font-size: 13.5px; }
  #ehs-cmd-app .tv-ring, #ehs-cmd-app .tv-ring-n { right: 4%; transform: scale(.85); transform-origin: top right; }
}

/* ---------- phone ---------- */
@media (max-width: 820px) {
  #ehs-cmd-app { border-radius: 22px; }
  #ehs-cmd-app .ec-topbar { padding: 12px 14px; gap: 10px; position: relative; }
  #ehs-cmd-app .ec-brand { flex: 1 1 100%; }
  #ehs-cmd-app .ec-brand-title { font-size: 15px; }
  #ehs-cmd-app .ec-top-actions { flex: 1 1 100%; justify-content: flex-start; gap: 6px; }
  #ehs-cmd-app #ec-preset-sel { flex: 1 1 100%; max-width: none; order: 9; }
  #ehs-cmd-app .ec-kbd-btn { display: none; }

  /* sidebar → swipeable pill row */
  #ehs-cmd-app .ec-shell { display: block; grid-template-columns: none; }
  #ehs-cmd-app .ec-rail { position: sticky; top: 0; z-index: 15; display: flex; flex-direction: row; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--ec-border);
    background: color-mix(in srgb, var(--ec-bg) 82%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); scrollbar-width: none; scroll-snap-type: x proximity; }
  #ehs-cmd-app .ec-rail::-webkit-scrollbar { display: none; }
  #ehs-cmd-app .ec-rail-group { display: none; }
  #ehs-cmd-app .ec-nav-btn { width: auto; flex: 0 0 auto; white-space: nowrap; padding: 9px 14px; border-radius: 999px; font-size: 13.5px; scroll-snap-align: start; transform: none; }
  #ehs-cmd-app .ec-nav-btn.active { transform: none; box-shadow: none; }
  #ehs-cmd-app .ec-nav-badge { display: none; }
  #ehs-cmd-app .ec-nav-ico { width: 15px; height: 15px; }

  /* content */
  #ehs-cmd-app .ec-main { padding: 16px 14px 48px; }
  #ehs-cmd-app .ec-page-hdr { flex-direction: column; align-items: flex-start; gap: 12px; }
  #ehs-cmd-app .ec-page-hdr h2 { font-size: 28px; }
  #ehs-cmd-app .ec-page-hdr > div:last-child { width: 100%; }
  #ehs-cmd-app .ec-page-hdr .ec-btn { flex: 1 1 auto; }
  #ehs-cmd-app .ec-g2, #ehs-cmd-app .ec-g3, #ehs-cmd-app .ec-g4, #ehs-cmd-app .ec-form-grid, #ehs-cmd-app .ec-photo-grid { grid-template-columns: minmax(0, 1fr); }
  #ehs-cmd-app .ec-card { padding: 16px; border-radius: 18px; }
  #ehs-cmd-app .ec-kpi-val { font-size: 30px; }
  #ehs-cmd-app .ec-tbl { font-size: 12.5px; }
  #ehs-cmd-app .ec-tbl th, #ehs-cmd-app .ec-tbl td { padding: 9px 10px; }
  #ehs-cmd-app .r2-seg { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  #ehs-cmd-app .r2-seg::-webkit-scrollbar { display: none; }
  #ehs-cmd-app .r2-seg button { flex: 0 0 auto; white-space: nowrap; }
  #ehs-cmd-app .r2-actions { gap: 6px; }
  #ehs-cmd-app .r2-prof { grid-template-columns: auto minmax(0, 1fr); padding: 16px; gap: 14px; }
  #ehs-cmd-app .r2-med, #ehs-cmd-app .r2-prof-sum { grid-column: span 1; }
  #ehs-cmd-app .r2-decs { grid-template-columns: minmax(0, 1fr); }
  #ehs-cmd-app .r2-sticky { bottom: 8px; padding: 10px 12px; }
  #ehs-cmd-app .r2-greet { padding: 20px; }
  #ehs-cmd-app .r2-phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #ehs-cmd-app .r2-bar { grid-template-columns: 90px 1fr 56px; }
  #ehs-cmd-app .r2-cols6 { gap: 6px; }
  #ehs-cmd-app .ai-strip { padding: 14px; }
  #ehs-cmd-app .ai-badge { margin-left: 0; }

  /* TV home */
  #ehs-cmd-app .tv-home { margin: -16px -14px 0; gap: 26px; }
  #ehs-cmd-app .tv-hero { min-height: 470px; border-radius: 0 0 26px 26px; padding: 0 18px 46px; }
  #ehs-cmd-app .tv-story { padding: 0 18px 78px; }
  #ehs-cmd-app .tv-hero .tv-title { font-size: clamp(32px, 9vw, 42px) !important; }
  #ehs-cmd-app .tv-hero .tv-body { font-size: 15.5px !important; }
  #ehs-cmd-app .tv-eyebrow { font-size: 11px; letter-spacing: .1em; }
  #ehs-cmd-app .tv-ctas { gap: 8px; }
  #ehs-cmd-app .tv-cta { padding: 12px 16px; font-size: 14.5px; }
  #ehs-cmd-app .tv-ring, #ehs-cmd-app .tv-ring-n { display: none; }
  #ehs-cmd-app .tv-dots { left: 18px; bottom: 40px; }
  #ehs-cmd-app .tv-ask { margin: -34px 14px 0; padding: 10px; gap: 8px; }
  #ehs-cmd-app .tv-ask input { flex: 1 1 100%; font-size: 15.5px; padding: 6px 4px; }
  #ehs-cmd-app .tv-ask .ai-orb { display: none; }
  #ehs-cmd-app .tv-chip { padding: 8px 12px; font-size: 12.5px; }
  #ehs-cmd-app .tv-sec { padding: 0 14px; }
  #ehs-cmd-app .tv-sec-h span { font-size: 12.5px; }
  #ehs-cmd-app .tv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #ehs-cmd-app .tv-kpis > div { padding: 14px; }
  #ehs-cmd-app .tv-kpis b { font-size: 26px; }
  #ehs-cmd-app .tv-shelf { gap: 14px; padding: 10px 2px 18px; margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
  #ehs-cmd-app .tv-up { width: 252px; height: 150px; }
  #ehs-cmd-app .tv-poster { width: 176px; height: 250px; }
  #ehs-cmd-app .tv-poster i { width: 84px; height: 84px; border-radius: 24px; font-size: 30px; top: 22px; }
  #ehs-cmd-app .tv-poster b { font-size: 24px; }
  #ehs-cmd-app .tv-mod { width: 160px; height: 96px; }
  /* touch: no 3D tilt, keep a gentle lift */
  #ehs-cmd-app .tv-tile:hover, #ehs-cmd-app .tv-tile:focus-visible { transform: scale(1.03); }
}

/* ---------- small phones ---------- */
@media (max-width: 400px) {
  #ehs-cmd-app .tv-kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #ehs-cmd-app .tv-kpis small { font-size: 10px; }
  #ehs-cmd-app .r2-prof { grid-template-columns: minmax(0, 1fr); }
  #ehs-cmd-app .r2-avatar { width: 52px; height: 52px; font-size: 18px; }
  #ehs-cmd-app .r2-phases { grid-template-columns: minmax(0, 1fr); }
  #ehs-cmd-app .ec-btn { padding: 8px 12px; }
}

/* touch devices never get the hover tilt */
@media (hover: none) {
  .tv-tile:hover { transform: none; box-shadow: none; }
  .tv-tile:hover::after { opacity: 0; }
}

/* overlays and panels on phones */
@media (max-width: 520px) {
  .r2-overlay { padding: 10px; }
  .r2-ov-box { margin-top: 2vh; }
  .r2-kiosk { padding: 16px; border-radius: 22px; }
  .r2-2col { grid-template-columns: 1fr !important; }
  .ai-panel { right: 10px; left: 10px; width: auto; bottom: 76px; max-height: calc(100vh - 110px); }
  .ec-pay-sheet { max-height: 92vh; overflow-y: auto; }
}

/* fixed inline grids in the original modules (report preview, gauges, boards) */
@media (max-width: 820px) {
  #ehs-cmd-app .ec-main [style*="repeat(4,1fr)"], #ehs-cmd-app .ec-main [style*="repeat(4, 1fr)"],
  #ehs-cmd-app .ec-main [style*="repeat(3,1fr)"], #ehs-cmd-app .ec-main [style*="repeat(3, 1fr)"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #ehs-cmd-app .ec-main [style*="repeat(5,1fr)"], #ehs-cmd-app .ec-main [style*="repeat(5, 1fr)"],
  #ehs-cmd-app .ec-main [style*="repeat(6,1fr)"], #ehs-cmd-app .ec-main [style*="repeat(6, 1fr)"] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  #ehs-cmd-app .ec-paper-preview { padding: 14px !important; overflow-x: auto; }
}

/* ---------- r3c: employee self-check, Apple TV look ---------- */
.r2-overlay:has(.ek-tv) { background: radial-gradient(90% 50% at 80% 0%, rgba(41,151,255,.35), transparent 60%), radial-gradient(70% 40% at 0% 100%, rgba(48,209,88,.2), transparent 60%), rgba(0,0,0,.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.r2-ov-box:has(.ek-tv) { width: min(440px, 100%); }
.r2-kiosk.ek-tv { background: rgba(28,28,30,.72); color: #f5f5f7; border: 1px solid rgba(255,255,255,.08); border-radius: 30px; padding: 22px 20px 20px; box-shadow: 0 40px 120px rgba(0,0,0,.6); font-family: Inter, -apple-system, "SF Pro Text", system-ui, sans-serif; }
.ek-tv, .ek-tv p, .ek-tv b, .ek-tv span, .ek-tv em, .ek-tv small, .ek-tv h1 { color: #f5f5f7; }
.ek-tv .r2-k-head { display: flex; align-items: center; gap: 10px; border: 0; padding: 0 0 6px; }
.ek-tv .r2-k-head b { font-size: 15px; } .ek-tv .r2-k-head > span:not(.ek-steps) { font-size: 12px; color: #98989d; }
.ek-tv .ek-logo { flex: none; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #2997ff, #30d158); }
.ek-tv .ek-steps { margin-left: auto; display: flex; gap: 5px; }
.ek-tv .ek-steps i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.25); transition: width .3s; }
.ek-tv .ek-steps i.done { background: #f5f5f7; } .ek-tv .ek-steps i.on { width: 22px; background: #f5f5f7; }
.ek-tv .r2-x { color: #f5f5f7; background: rgba(255,255,255,.1); }
.ek-tv .ek-h { margin: 16px 0 6px; font-size: 32px; line-height: 1.05; letter-spacing: -.04em; font-weight: 800; }
.ek-tv .ek-sub { margin: 0 0 10px; font-size: 14.5px; line-height: 1.45; color: #aeaeb2 !important; }
.ek-tv .r2-k-form label { color: #c7c7cc !important; font-weight: 600; font-size: 13px; }
.ek-tv .r2-k-form input { background: rgba(44,44,46,.9) !important; color: #fff !important; border: 0 !important; border-radius: 14px !important; padding: 15px 16px !important; font: 600 20px Inter, system-ui, sans-serif !important; letter-spacing: .04em; }
.ek-tv .r2-k-form input:focus { outline: none; box-shadow: 0 0 0 3px rgba(41,151,255,.6); }
.ek-tv .r2-k-btn { background: #f5f5f7 !important; color: #000 !important; border-radius: 16px; padding: 16px; font: 700 17px Inter, system-ui, sans-serif; border: 0; margin-top: 8px; }
.ek-tv .r2-k-btn.sm { padding: 11px 14px; font-size: 14px; background: rgba(41,151,255,.18) !important; color: #64b5ff !important; }
.ek-tv .r2-k-btn.sec { background: rgba(255,255,255,.12) !important; color: #fff !important; }
.ek-tv .r2-k-msg { color: #8e8e93 !important; font-size: 12.5px; text-align: center; }
.ek-tv .r2-k-who { font-size: 13px; color: #98989d; margin-bottom: 10px; } .ek-tv .r2-k-who b { color: #f5f5f7; }
.ek-tv .r2-k-v { background: rgba(28,28,30,.9); border: 1px solid rgba(48,209,88,.35); border-radius: 22px; padding: 16px; }
.ek-tv .r2-k-v svg { background: #fff; border-radius: 14px; padding: 8px; }
.ek-tv .r2-k-row { background: rgba(44,44,46,.7) !important; border: 0 !important; border-radius: 16px; padding: 13px 16px; margin-top: 8px; }
.ek-tv .r2-k-row span { font-weight: 600; font-size: 15px; } .ek-tv .r2-k-row small { color: #8e8e93; }
.ek-tv .r2-k-row em { font-style: normal; font-weight: 700; font-size: 13px; }
.ek-tv .r2-k-row.ok em { color: #30d158; } .ek-tv .r2-k-row.warn em { color: #ff9f0a; } .ek-tv .r2-k-row.bad em { color: #ff453a; } .ek-tv .r2-k-row.info em { color: #64b5ff; }
.r2-overlay:has(.ek-tv) { background-color: #000 !important; }
.ek-tv .r2-x[hidden] { display: none !important; }
.ek-tv .r2-k-form input { box-sizing: border-box; width: 100%; max-width: 100%; }
.ek-tv .r2-k-head > span:not(.ek-steps) { display: none; }
.ek-tv #ek-co::before { display: none !important; content: none !important; }
.ek-tv h1.ek-h { color: #f5f5f7 !important; -webkit-text-fill-color: #f5f5f7; background: none !important; }
.ek-tv .ek-steps { flex: none; }

/* ---------- r3d: every studio window in the TV dark-glass style ---------- */
.r2-overlay { background: radial-gradient(80% 60% at 85% 0%, rgba(41,151,255,.22), transparent 60%), rgba(0,0,0,.72) !important; backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%); }
.r2-kiosk { background: linear-gradient(180deg, rgba(44,44,46,.96), rgba(28,28,30,.97)) !important; color: #f5f5f7 !important; border: 1px solid rgba(255,255,255,.09); box-shadow: 0 40px 120px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06); font-family: Inter, -apple-system, "SF Pro Text", system-ui, sans-serif; }
.r2-kiosk, .r2-kiosk p, .r2-kiosk h4, .r2-kiosk td, .r2-kiosk b, .r2-kiosk li, .r2-kiosk strong { color: #f5f5f7; }
.r2-kiosk th { color: #98989d; background: rgba(255,255,255,.04); }
.r2-kiosk td, .r2-kiosk th { border-color: rgba(255,255,255,.08) !important; }
.r2-kiosk small, .r2-kiosk .r2-muted, .r2-kiosk .r2-k-head span { color: #98989d !important; }
.r2-kiosk .r2-k-head { border-bottom-color: rgba(255,255,255,.08); }
.r2-kiosk .r2-k-head b { font-size: 19px; letter-spacing: -.02em; }
.r2-kiosk .r2-x { background: rgba(255,255,255,.1); color: #f5f5f7; }
.r2-kiosk .r2-x:hover { background: rgba(255,255,255,.18); }
.r2-kiosk .r2-k-form label, .r2-kiosk .r2-scan label { color: #c7c7cc !important; }
.r2-kiosk .r2-k-form input, .r2-kiosk .r2-k-form select, .r2-kiosk .r2-k-form textarea, .r2-kiosk .r2-scan input, .r2-kiosk .r2-share { background: rgba(0,0,0,.35) !important; color: #fff !important; border: 1px solid rgba(255,255,255,.1) !important; box-sizing: border-box; max-width: 100%; }
.r2-kiosk .r2-k-form input:focus, .r2-kiosk .r2-k-form select:focus, .r2-kiosk .r2-k-form textarea:focus { border-color: #2997ff !important; box-shadow: 0 0 0 3px rgba(41,151,255,.35) !important; outline: none; }
.r2-kiosk select option { background: #1c1c1e; color: #fff; }
.r2-kiosk .r2-k-btn { background: #f5f5f7; color: #000 !important; font-weight: 700; }
.r2-kiosk .r2-k-btn.sec { background: rgba(255,255,255,.12); color: #fff !important; }
.r2-kiosk .r2-k-btn.sm:not(.sec) { background: #2997ff; color: #fff !important; }
.r2-kiosk .r2-k-msg { color: #98989d; } .r2-kiosk .r2-k-msg.bad { color: #ff453a; }
.r2-kiosk .r2-k-row { background: rgba(255,255,255,.06); }
.r2-kiosk .r2-k-row.ok em { color: #30d158; } .r2-kiosk .r2-k-row.warn em { color: #ff9f0a; } .r2-kiosk .r2-k-row.bad em { color: #ff453a; } .r2-kiosk .r2-k-row.info em { color: #64b5ff; }
.r2-kiosk .r2-k-row.ok::after { background: #30d158; } .r2-kiosk .r2-k-row.warn::after { background: #ff9f0a; } .r2-kiosk .r2-k-row.bad::after { background: #ff453a; } .r2-kiosk .r2-k-row.info::after { background: #2997ff; }
.r2-kiosk .r2-k-v { background: rgba(48,209,88,.08); border-color: rgba(48,209,88,.3); }
.r2-kiosk .r2-k-v::before { background: rgba(48,209,88,.18); color: #30d158; }
.r2-kiosk .r2-k-v svg { background: #fff; padding: 8px; }
.r2-kiosk a { color: #64b5ff; }
/* the printable ticket stays paper-white */
.r2-kiosk .vch, .r2-kiosk .vch * { color: #1d1d1f; }
.r2-kiosk .vch { background: #fff; border-radius: 18px; }
.r2-kiosk .r2-k-form input, .r2-kiosk .r2-k-form select, .r2-kiosk .r2-k-form textarea, .r2-kiosk .r2-scan input, .r2-kiosk .r2-share { -webkit-text-fill-color: #fff !important; }
.r2-kiosk input::placeholder, .r2-kiosk textarea::placeholder { color: #8e8e93; -webkit-text-fill-color: #8e8e93; }
.r2-kiosk .r2-s-item { background: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.08) !important; }
.r2-kiosk .r2-size { background: rgba(255,255,255,.1) !important; color: #f5f5f7 !important; border-color: rgba(255,255,255,.12) !important; }
.r2-kiosk .r2-size.zero { color: #ff453a !important; background: rgba(255,69,58,.12) !important; }
.r2-kiosk .r2-sig { border-color: rgba(255,255,255,.3); }
/* Aizen panel, dark glass */
.ai-panel { background: linear-gradient(180deg, rgba(44,44,46,.97), rgba(28,28,30,.98)) !important; color: #f5f5f7 !important; border: 1px solid rgba(255,255,255,.09); box-shadow: 0 40px 120px rgba(0,0,0,.6); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.ai-panel .ai-head { background: radial-gradient(120% 140% at 0% 0%, rgba(94,92,230,.35), transparent 60%), rgba(255,255,255,.03) !important; border-bottom-color: rgba(255,255,255,.08) !important; }
.ai-panel .ai-head b { color: #f5f5f7; } .ai-panel .ai-head small, .ai-panel .ai-typing { color: #98989d !important; }
.ai-panel .ai-x { background: rgba(255,255,255,.1) !important; color: #f5f5f7 !important; }
.ai-panel .ai-msg.a { background: rgba(255,255,255,.08) !important; color: #f5f5f7; }
.ai-panel .ai-msg.a b, .ai-panel .ai-msg.a strong, .ai-panel .ai-msg.a li { color: #f5f5f7; }
.ai-panel .ai-go { color: #64b5ff !important; }
.ai-panel .ai-sugg button { background: rgba(255,255,255,.08) !important; border-color: rgba(255,255,255,.12) !important; color: #f5f5f7 !important; }
.ai-panel .ai-form { border-top-color: rgba(255,255,255,.08) !important; }
.ai-panel .ai-form input { background: rgba(0,0,0,.35) !important; color: #fff !important; -webkit-text-fill-color: #fff; border-color: rgba(255,255,255,.12) !important; }
.ai-panel .ai-enable { background: rgba(94,92,230,.14) !important; color: #b4b3ff !important; border-color: rgba(94,92,230,.5) !important; }
.r2-kiosk h1:not(.vch *), .r2-kiosk h2:not(.vch *), .r2-kiosk h3:not(.vch *), .r2-kiosk h4:not(.vch *) { color: #f5f5f7 !important; -webkit-text-fill-color: #f5f5f7; }

/* ---------- r3e: live status chip on module tiles ---------- */
#ehs-cmd-app .tv-mod { position: relative; }
#ehs-cmd-app .tv-mod-st { position: absolute; top: 12px; right: 12px; font-style: normal; font-size: 11.5px; font-weight: 700; letter-spacing: .01em; padding: 4px 9px; border-radius: 999px; color: #f5f5f7; background: rgba(0,0,0,.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.14); max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ehs-cmd-app .tv-mod-st.ok { color: #30d158; } #ehs-cmd-app .tv-mod-st.mid { color: #ffd60a; } #ehs-cmd-app .tv-mod-st.warn { color: #ff9f0a; border-color: rgba(255,159,10,.4); }
[dir="rtl"] #ehs-cmd-app .tv-mod-st { right: auto; left: 12px; }
#ehs-cmd-app .tv-mod-st { top: auto; bottom: 11px; }

/* ---------- r3f: sidebar badges never wrap ---------- */
#ehs-cmd-app .ec-nav-badge { white-space: nowrap; flex: none; font-size: 11px; padding: 2px 8px; line-height: 1.5; font-variant-numeric: tabular-nums; }
#ehs-cmd-app .ec-nav-btn { align-items: center; }
#ehs-cmd-app .ec-nav-btn > span:not(.ec-nav-badge):not(.ec-nav-ico) { min-width: 0; }

/* ---------- r3g: Safety cross on Today ---------- */
#ehs-cmd-app .sx-wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(18px, 3vw, 40px); align-items: center; padding: clamp(16px, 2.4vw, 28px); border-radius: 26px; background: radial-gradient(70% 90% at 10% 50%, rgba(48,209,88,.16), transparent 70%), color-mix(in srgb, var(--ec-surface) 92%, transparent); border: 1px solid var(--ec-border); }
#ehs-cmd-app .sx-grid { display: grid; grid-template-columns: repeat(7, clamp(34px, 4.2vw, 50px)); grid-template-rows: repeat(7, clamp(34px, 4.2vw, 50px)); gap: 5px; }
#ehs-cmd-app .sx-c { display: grid; place-items: center; border-radius: 10px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: #fff; transition: transform .15s; cursor: default; }
#ehs-cmd-app .sx-c:hover { transform: scale(1.12); z-index: 1; }
#ehs-cmd-app .sx-none { background: transparent; }
#ehs-cmd-app .sx-ok, #ehs-cmd-app .sx-dot.sx-ok { background: linear-gradient(160deg, #34c759, #248a3d); }
#ehs-cmd-app .sx-nm, #ehs-cmd-app .sx-dot.sx-nm { background: linear-gradient(160deg, #40a9ff, #0a6fd6); }
#ehs-cmd-app .sx-fa, #ehs-cmd-app .sx-dot.sx-fa { background: linear-gradient(160deg, #ffd60a, #e0a800); color: #1d1d1f; }
#ehs-cmd-app .sx-rec, #ehs-cmd-app .sx-dot.sx-rec { background: linear-gradient(160deg, #ff9f0a, #d97706); }
#ehs-cmd-app .sx-lti, #ehs-cmd-app .sx-dot.sx-lti { background: linear-gradient(160deg, #ff453a, #c5221f); }
#ehs-cmd-app .sx-fut { background: color-mix(in srgb, var(--ec-text) 8%, transparent); color: var(--ec-muted); font-weight: 600; }
#ehs-cmd-app .sx-today { box-shadow: 0 0 0 2px var(--ec-bg), 0 0 0 4px var(--ec-text); }
#ehs-cmd-app .sx-big b { display: block; font-size: clamp(46px, 6vw, 72px); line-height: 1; letter-spacing: -.05em; font-weight: 800; background: linear-gradient(135deg, #30d158, #0a84ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
#ehs-cmd-app .sx-big small { display: block; margin-top: 6px; color: var(--ec-muted); font-size: 13px; line-height: 1.35; }
#ehs-cmd-app .sx-leg { list-style: none; padding: 0; margin: 18px 0 12px; display: grid; gap: 7px; font-size: 13.5px; }
#ehs-cmd-app .sx-leg li { display: flex; align-items: center; gap: 9px; } #ehs-cmd-app .sx-leg b { margin-left: auto; font-variant-numeric: tabular-nums; }
#ehs-cmd-app .sx-dot { width: 14px; height: 14px; border-radius: 4px; flex: none; }
#ehs-cmd-app .sx-note { font-size: 12.5px; color: var(--ec-muted); line-height: 1.45; margin: 0 0 12px; max-width: 34ch; }
@media (max-width: 820px) {
  #ehs-cmd-app .sx-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  #ehs-cmd-app .sx-grid { grid-template-columns: repeat(7, minmax(0, 40px)); grid-template-rows: repeat(7, 40px); }
  #ehs-cmd-app .sx-side { width: 100%; } #ehs-cmd-app .sx-leg { text-align: left; } #ehs-cmd-app .sx-note { margin-inline: auto; }
}
@media (max-width: 820px) { #ehs-cmd-app .ec-top-actions { flex-wrap: wrap; min-width: 0; max-width: 100%; } #ehs-cmd-app .ec-top-actions .ec-select { flex: 1 1 100%; width: 100%; min-width: 0; max-width: 100%; order: 9; } }

/* ---------- r3h: Hotspots on Today ---------- */
#ehs-cmd-app .hs-list { list-style: none; margin: 0; padding: 6px; display: grid; gap: 4px; border-radius: 26px; background: radial-gradient(80% 120% at 100% 0%, rgba(255,69,58,.12), transparent 60%), color-mix(in srgb, var(--ec-surface) 92%, transparent); border: 1px solid var(--ec-border); }
#ehs-cmd-app .hs-list li { display: grid; grid-template-columns: 34px minmax(0, 1.4fr) minmax(80px, 1fr) 44px; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 20px; }
#ehs-cmd-app .hs-list li + li { border-top: 1px solid var(--ec-border); border-radius: 0; }
#ehs-cmd-app .hs-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #fff; }
#ehs-cmd-app .hs-hot .hs-n { background: linear-gradient(160deg, #ff453a, #c5221f); box-shadow: 0 0 18px rgba(255,69,58,.45); }
#ehs-cmd-app .hs-warm .hs-n { background: linear-gradient(160deg, #ff9f0a, #d97706); }
#ehs-cmd-app .hs-mild .hs-n { background: linear-gradient(160deg, #ffd60a, #e0a800); color: #1d1d1f; }
#ehs-cmd-app .hs-main b { display: block; font-size: 16px; letter-spacing: -.01em; }
#ehs-cmd-app .hs-main small { display: block; color: var(--ec-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ehs-cmd-app .hs-why { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
#ehs-cmd-app .hs-why em { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--ec-text) 8%, transparent); }
#ehs-cmd-app .hs-bar { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--ec-text) 8%, transparent); overflow: hidden; }
#ehs-cmd-app .hs-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffd60a, #ff9f0a 55%, #ff453a); }
#ehs-cmd-app .hs-s { font-weight: 800; font-size: 18px; text-align: right; font-variant-numeric: tabular-nums; }
#ehs-cmd-app .hs-note { font-size: 12px; color: var(--ec-muted); margin: 10px 6px 0; line-height: 1.45; }
@media (max-width: 820px) {
  #ehs-cmd-app .hs-list li { grid-template-columns: 30px minmax(0, 1fr) 36px; gap: 10px; }
  #ehs-cmd-app .hs-bar { grid-column: 2 / -1; grid-row: 2; }
}

/* ---------- r3i: Toolbox talk of the day ---------- */
#ehs-cmd-app .tb-card { padding: clamp(18px, 2.4vw, 28px); border-radius: 26px; border: 1px solid var(--ec-border); background: radial-gradient(70% 120% at 0% 0%, rgba(94,92,230,.18), transparent 60%), radial-gradient(60% 100% at 100% 100%, rgba(41,151,255,.12), transparent 60%), color-mix(in srgb, var(--ec-surface) 92%, transparent); }
#ehs-cmd-app .tb-head { display: flex; gap: 14px; align-items: flex-start; }
#ehs-cmd-app .tb-mic { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #5e5ce6, #0a84ff); box-shadow: 0 8px 24px rgba(94,92,230,.35); }
#ehs-cmd-app .tb-head b { display: block; font-size: clamp(18px, 2vw, 22px); letter-spacing: -.02em; line-height: 1.2; }
#ehs-cmd-app .tb-head small { display: block; margin-top: 4px; color: var(--ec-muted); font-size: 12.5px; line-height: 1.4; }
#ehs-cmd-app .tb-pts { counter-reset: tb; list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#ehs-cmd-app .tb-pts li { counter-increment: tb; position: relative; padding: 12px 14px 12px 50px; border-radius: 16px; background: color-mix(in srgb, var(--ec-text) 5%, transparent); font-size: 14.5px; line-height: 1.4; font-weight: 500; }
#ehs-cmd-app .tb-pts li::before { content: counter(tb); position: absolute; left: 12px; top: 10px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: linear-gradient(135deg, #5e5ce6, #0a84ff); }
#ehs-cmd-app .tb-lesson { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; border-left: 4px solid #ff9f0a; background: rgba(255,159,10,.1); font-size: 13.5px; line-height: 1.45; }
#ehs-cmd-app .tb-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
@media (max-width: 820px) { #ehs-cmd-app .tb-pts { grid-template-columns: minmax(0, 1fr); } }

/* ---------- r3j: EHS pulse radar ---------- */
#ehs-cmd-app .pl-wrap { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: clamp(16px, 3vw, 40px); align-items: center; padding: clamp(14px, 2.2vw, 26px); border-radius: 26px; border: 1px solid var(--ec-border); background: radial-gradient(60% 90% at 25% 50%, rgba(10,132,255,.16), transparent 70%), color-mix(in srgb, var(--ec-surface) 92%, transparent); }
#ehs-cmd-app .pl-svg { width: 100%; height: auto; overflow: visible; }
#ehs-cmd-app .pl-ring { fill: none; stroke: color-mix(in srgb, var(--ec-text) 12%, transparent); stroke-width: 1; }
#ehs-cmd-app .pl-ax { stroke: color-mix(in srgb, var(--ec-text) 10%, transparent); stroke-width: 1; }
#ehs-cmd-app .pl-shape { fill: url(#plg); fill-opacity: .32; stroke: url(#plg); stroke-width: 2.5; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) { #ehs-cmd-app .pl-shape { transform-origin: 150px 150px; animation: plgrow .9s cubic-bezier(.2, .9, .3, 1.1) both; } }
@keyframes plgrow { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
#ehs-cmd-app .pl-dot { fill: #fff; stroke: #0a84ff; stroke-width: 2.5; }
#ehs-cmd-app .pl-lbl { fill: var(--ec-muted); font-size: 12.5px; font-weight: 600; }
#ehs-cmd-app .pl-avg { fill: var(--ec-text); font-size: 30px; font-weight: 800; letter-spacing: -.04em; }
#ehs-cmd-app .pl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#ehs-cmd-app .pl-list button { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 16px; border: 0; cursor: pointer; font: inherit; color: inherit; background: color-mix(in srgb, var(--ec-text) 5%, transparent); transition: background .15s, transform .15s; }
#ehs-cmd-app .pl-list button:hover { background: color-mix(in srgb, var(--ec-text) 10%, transparent); transform: translateY(-1px); }
#ehs-cmd-app .pl-n { flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 16px; color: #fff; font-variant-numeric: tabular-nums; }
#ehs-cmd-app .pl-ok { background: linear-gradient(160deg, #34c759, #248a3d); } #ehs-cmd-app .pl-mid { background: linear-gradient(160deg, #ffd60a, #e0a800); color: #1d1d1f; } #ehs-cmd-app .pl-low { background: linear-gradient(160deg, #ff9f0a, #d97706); }
#ehs-cmd-app .pl-list b { display: block; font-size: 14.5px; } #ehs-cmd-app .pl-list small { display: block; color: var(--ec-muted); font-size: 11.5px; line-height: 1.35; }
#ehs-cmd-app .pl-focus { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: rgba(10,132,255,.1); border-left: 4px solid #0a84ff; font-size: 13.5px; line-height: 1.45; }
@media (max-width: 1080px) { #ehs-cmd-app .pl-list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 820px) { #ehs-cmd-app .pl-wrap { grid-template-columns: minmax(0, 1fr); } #ehs-cmd-app .pl-svg { max-width: 340px; margin: 0 auto; display: block; } }
#ehs-cmd-app .pl-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)) !important; }

/* ---------- r3k: Today jump bar ---------- */
#ehs-cmd-app .tv-jump { position: sticky; top: 76px; z-index: 12; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 clamp(18px, 3.4vw, 48px); padding: 5px; border-radius: 999px; border: 1px solid var(--ec-border); background: color-mix(in srgb, var(--ec-bg) 78%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 8px 30px rgba(0,0,0,.12); }
#ehs-cmd-app .tv-jump::-webkit-scrollbar { display: none; }
#ehs-cmd-app .tv-jump a { flex: none; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ec-muted); text-decoration: none; white-space: nowrap; transition: background .2s, color .2s; }
#ehs-cmd-app .tv-jump a:hover { color: var(--ec-text); background: color-mix(in srgb, var(--ec-text) 7%, transparent); }
#ehs-cmd-app .tv-jump a.on { color: var(--ec-bg); background: var(--ec-text); }
#ehs-cmd-app .tv-home .tv-sec { scroll-margin-top: 140px; }
@media (max-width: 820px) { #ehs-cmd-app .tv-jump { position: static; margin: 0 14px; } #ehs-cmd-app .tv-home .tv-sec { scroll-margin-top: 70px; } }
#ehs-cmd-app .tv-jump { position: relative; top: auto; }
#ehs-cmd-app .tv-jump.float { position: fixed; top: 72px; margin: 0; z-index: 60; }
/* floating copy lives on <body>, outside #ehs-cmd-app */
body > .tv-jump.float { position: fixed; top: 72px; z-index: 900; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 5px; border-radius: 999px; border: 1px solid var(--ec-border); background: color-mix(in srgb, var(--ec-bg) 80%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 10px 34px rgba(0,0,0,.18); box-sizing: border-box; }
body > .tv-jump.float::-webkit-scrollbar { display: none; }
body > .tv-jump.float a { flex: none; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ec-muted); text-decoration: none; white-space: nowrap; }
body > .tv-jump.float a:hover { color: var(--ec-text); }
body > .tv-jump.float a.on { color: var(--ec-bg); background: var(--ec-text); }

/* ---------- r3l: Week ahead ---------- */
#ehs-cmd-app .wk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
#ehs-cmd-app .wk-day { min-height: 170px; display: flex; flex-direction: column; gap: 5px; padding: 10px; border-radius: 20px; border: 1px solid var(--ec-border); background: color-mix(in srgb, var(--ec-surface) 92%, transparent); }
#ehs-cmd-app .wk-today { border-color: transparent; background: radial-gradient(120% 80% at 50% 0%, rgba(10,132,255,.22), transparent 70%), color-mix(in srgb, var(--ec-surface) 92%, transparent); box-shadow: 0 0 0 2px #0a84ff inset; }
#ehs-cmd-app .wk-off { opacity: .6; }
#ehs-cmd-app .wk-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
#ehs-cmd-app .wk-h small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ec-muted); }
#ehs-cmd-app .wk-h b { font-size: 24px; letter-spacing: -.04em; font-weight: 800; }
#ehs-cmd-app .wk-today .wk-h small { color: #0a84ff; }
#ehs-cmd-app .wk-ev { all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; padding: 5px 8px 5px 10px; border-radius: 9px; font-size: 11.5px; line-height: 1.3; font-weight: 600; color: var(--ec-text); background: color-mix(in srgb, var(--k) 16%, transparent); border-left: 3px solid var(--k); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#ehs-cmd-app .wk-ev:hover { background: color-mix(in srgb, var(--k) 26%, transparent); }
#ehs-cmd-app .wk-ev:focus-visible { outline: 2px solid var(--k); outline-offset: 2px; }
#ehs-cmd-app .wk-free, #ehs-cmd-app .wk-more { font-size: 12px; color: var(--ec-muted); }
@media (max-width: 1080px) { #ehs-cmd-app .wk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 820px) { #ehs-cmd-app .wk-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; } #ehs-cmd-app .wk-grid::-webkit-scrollbar { display: none; } #ehs-cmd-app .wk-day { flex: 0 0 62%; scroll-snap-align: start; min-height: 150px; } }
@media (min-width: 821px) { #ehs-cmd-app .wk-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; } #ehs-cmd-app .wk-day { min-height: 130px; } #ehs-cmd-app .wk-ev { -webkit-line-clamp: 3; } }

/* ---------- r3m: waste flow ---------- */
#ehs-cmd-app .wf-card { margin-bottom: 16px; background: radial-gradient(60% 80% at 100% 0%, rgba(48,209,88,.10), transparent 60%), var(--ec-surface); }
#ehs-cmd-app .wf-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#ehs-cmd-app .wf-svg { width: 100%; min-width: 620px; height: auto; display: block; }
#ehs-cmd-app .wf-band { fill-opacity: .42; transition: fill-opacity .15s; }
#ehs-cmd-app .wf-band:hover { fill-opacity: .8; }
#ehs-cmd-app .wf-l { fill: var(--ec-text); font-size: 12.5px; font-weight: 600; }
#ehs-cmd-app .wf-kg { fill: var(--ec-muted); font-weight: 500; }
#ehs-cmd-app .wf-r { fill: var(--ec-text); font-size: 13.5px; font-weight: 700; }
#ehs-cmd-app .wf-rp { fill: var(--ec-muted); font-size: 12px; }

/* ---------- r3n: inspection 12-week timeline ---------- */
#ehs-cmd-app .it-card { margin-bottom: 16px; }
#ehs-cmd-app .it-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#ehs-cmd-app .it-grid { min-width: 720px; display: grid; gap: 2px; }
#ehs-cmd-app .it-row { display: grid; grid-template-columns: minmax(200px, 1.6fr) repeat(12, minmax(34px, 1fr)); align-items: center; border-radius: 10px; }
#ehs-cmd-app .it-row:not(.it-head):not(.it-load):hover { background: color-mix(in srgb, var(--ec-text) 5%, transparent); }
#ehs-cmd-app .it-head span { font-size: 11px; font-weight: 700; color: var(--ec-muted); text-align: center; padding: 4px 0; }
#ehs-cmd-app .it-head .it-now { color: #0a84ff; }
#ehs-cmd-app .it-n { padding: 6px 8px; min-width: 0; } #ehs-cmd-app .it-n b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #ehs-cmd-app .it-n small { display: block; font-size: 11px; color: var(--ec-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ehs-cmd-app .it-c { height: 34px; display: grid; place-items: center; border-left: 1px dashed color-mix(in srgb, var(--ec-text) 8%, transparent); }
#ehs-cmd-app .it-row .it-c:nth-child(2) { background: rgba(10,132,255,.07); }
#ehs-cmd-app .it-due { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, #0a84ff, #5e5ce6); box-shadow: 0 0 0 3px rgba(10,132,255,.18); }
#ehs-cmd-app .it-late { width: 16px; height: 16px; border-radius: 50%; border: 3px solid #ff453a; box-shadow: 0 0 12px rgba(255,69,58,.5); }
@media (prefers-reduced-motion: no-preference) { #ehs-cmd-app .it-late { animation: itp 1.6s ease-in-out infinite; } }
@keyframes itp { 50% { box-shadow: 0 0 2px rgba(255,69,58,.2); } }
#ehs-cmd-app .it-isl .it-n b { color: #ff453a; }
#ehs-cmd-app .it-load { margin-top: 6px; border-top: 1px solid var(--ec-border); padding-top: 6px; }
#ehs-cmd-app .it-load .it-c { height: 52px; align-content: end; gap: 2px; border: 0; }
#ehs-cmd-app .it-load em { width: 14px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #5e5ce6, #0a84ff); }
#ehs-cmd-app .it-load small { font-size: 11px; font-weight: 700; color: var(--ec-muted); }

/* ---------- r3o: variance chart ---------- */
#ehs-cmd-app .vc { margin: 10px 0 16px; padding: 14px 16px; border-radius: 18px; background: color-mix(in srgb, var(--ec-text) 4%, transparent); }
#ehs-cmd-app .vc-axis { display: grid; grid-template-columns: 170px 1fr 64px; font-size: 11px; color: var(--ec-muted); font-weight: 600; }
#ehs-cmd-app .vc-axis span:nth-child(1) { grid-column: 2; justify-self: start; } #ehs-cmd-app .vc-axis span:nth-child(2) { grid-column: 2; grid-row: 1; justify-self: center; } #ehs-cmd-app .vc-axis span:nth-child(3) { grid-column: 2; grid-row: 1; justify-self: end; }
#ehs-cmd-app .vc-row { display: grid; grid-template-columns: 170px 1fr 64px; gap: 12px; align-items: center; padding: 7px 0; }
#ehs-cmd-app .vc-l b { display: block; font-size: 13.5px; } #ehs-cmd-app .vc-l em { display: block; font-style: normal; font-size: 11px; font-weight: 700; color: #ff9f0a; }
#ehs-cmd-app .vc-track { position: relative; height: 18px; border-radius: 9px; background: color-mix(in srgb, var(--ec-text) 6%, transparent); }
#ehs-cmd-app .vc-track i { position: absolute; top: 0; bottom: 0; }
#ehs-cmd-app .vc-band { background: rgba(48,209,88,.16); border-left: 1px dashed rgba(48,209,88,.6); border-right: 1px dashed rgba(48,209,88,.6); }
#ehs-cmd-app .vc-zero { left: 50%; width: 2px; margin-left: -1px; background: var(--ec-muted); opacity: .6; }
#ehs-cmd-app .vc-bar { top: 3px !important; bottom: 3px !important; border-radius: 6px; }
#ehs-cmd-app .vc-ok { background: linear-gradient(90deg, #30d158, #248a3d); } #ehs-cmd-app .vc-big { background: linear-gradient(90deg, #ffb340, #ff9f0a); box-shadow: 0 0 12px rgba(255,159,10,.45); }
#ehs-cmd-app .vc-v { font-weight: 800; font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; } #ehs-cmd-app .vc-bigt { color: #ff9f0a; }
#ehs-cmd-app .vc-leg { margin: 8px 0 0; font-size: 12px; color: var(--ec-muted); } #ehs-cmd-app .vc-leg i { display: inline-block; width: 18px; height: 10px; border-radius: 3px; background: rgba(48,209,88,.25); vertical-align: -1px; }
@media (max-width: 820px) { #ehs-cmd-app .vc-row, #ehs-cmd-app .vc-axis { grid-template-columns: 96px 1fr 52px; gap: 8px; } }

/* ---------- r3p: CSH action board ---------- */
#ehs-cmd-app .cb-card { margin-bottom: 16px; }
#ehs-cmd-app .cb-top { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: baseline; margin-bottom: 12px; }
#ehs-cmd-app .cb-top h3 { margin: 0; } #ehs-cmd-app .cb-top > span { font-size: 13px; color: var(--ec-muted); justify-self: end; }
#ehs-cmd-app .cb-prog { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--ec-text) 8%, transparent); overflow: hidden; } #ehs-cmd-app .cb-prog i { display: block; height: 100%; background: linear-gradient(90deg, #30d158, #0a84ff); border-radius: inherit; }
#ehs-cmd-app .cb-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#ehs-cmd-app .cb-col { padding: 10px; border-radius: 18px; background: color-mix(in srgb, var(--c) 7%, transparent); border-top: 3px solid var(--c); min-height: 120px; }
#ehs-cmd-app .cb-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; } #ehs-cmd-app .cb-h span { min-width: 24px; text-align: center; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 99px; color: #fff; background: var(--c); }
#ehs-cmd-app .cb-card1 { padding: 10px 12px; border-radius: 14px; background: var(--ec-surface); border: 1px solid var(--ec-border); margin-bottom: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
#ehs-cmd-app .cb-card1 small { font-size: 11px; color: var(--ec-muted); font-weight: 600; } #ehs-cmd-app .cb-card1 p { margin: 4px 0 8px; font-size: 13.5px; line-height: 1.35; font-weight: 500; }
#ehs-cmd-app .cb-late { border-color: rgba(255,69,58,.5); box-shadow: 0 0 0 1px rgba(255,69,58,.25), 0 4px 14px rgba(255,69,58,.12); }
#ehs-cmd-app .cb-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#ehs-cmd-app .cb-due { font-size: 11.5px; font-weight: 700; color: var(--ec-muted); } #ehs-cmd-app .cb-late .cb-due { color: #ff453a; }
#ehs-cmd-app .cb-mv { display: flex; gap: 4px; } #ehs-cmd-app .cb-mv button { width: 30px; height: 28px; border-radius: 9px; border: 1px solid var(--ec-border); background: color-mix(in srgb, var(--ec-text) 5%, transparent); color: var(--ec-text); cursor: pointer; font-weight: 700; }
#ehs-cmd-app .cb-mv button:hover { background: var(--ec-text); color: var(--ec-bg); }
#ehs-cmd-app .cb-empty { font-size: 12.5px; color: var(--ec-muted); text-align: center; margin: 20px 0; }
@media (max-width: 820px) { #ehs-cmd-app .cb-cols { grid-template-columns: minmax(0, 1fr); } }

/* ---------- r3q: audit gallery ---------- */
#ehs-cmd-app .ag { margin-top: 16px; }
#ehs-cmd-app .ag-h h3 { margin: 0 0 4px; } #ehs-cmd-app .ag-h p { margin: 0 0 12px; color: var(--ec-muted); font-size: 13.5px; }
#ehs-cmd-app .ag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 10px; }
#ehs-cmd-app .ag-c { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 20px; border: 1px solid var(--ec-border); background: radial-gradient(90% 70% at 100% 0%, rgba(191,90,242,.10), transparent 60%), var(--ec-surface); transition: transform .15s, box-shadow .15s, border-color .15s; }
#ehs-cmd-app .ag-c:hover, #ehs-cmd-app .ag-c:focus-visible { transform: translateY(-2px); border-color: #bf5af2; box-shadow: 0 12px 30px rgba(191,90,242,.18); }
#ehs-cmd-app .ag-i { font-size: 26px; line-height: 1; } #ehs-cmd-app .ag-c b { font-size: 15.5px; letter-spacing: -.01em; } #ehs-cmd-app .ag-c small { font-size: 12.5px; color: var(--ec-muted); line-height: 1.35; }
#ehs-cmd-app .ag-meta { display: flex; flex-wrap: wrap; gap: 5px; } #ehs-cmd-app .ag-meta em { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(191,90,242,.13); color: #bf5af2; }
#ehs-cmd-app .ag-f { font-size: 12px; line-height: 1.4; color: var(--ec-text); opacity: .85; } #ehs-cmd-app .ag-f i { font-style: normal; font-weight: 700; color: var(--ec-muted); }
#ehs-cmd-app .au-flash { animation: auf 1.2s ease; border-radius: 14px; } @keyframes auf { 0%, 60% { box-shadow: 0 0 0 4px rgba(191,90,242,.45); } 100% { box-shadow: none; } }

/* ---------- r3r: PPE heatmap ---------- */
#ehs-cmd-app .ph-card { margin-bottom: 16px; }
#ehs-cmd-app .ph-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#ehs-cmd-app .ph { border-collapse: separate; border-spacing: 3px; min-width: 640px; width: 100%; font-variant-numeric: tabular-nums; }
#ehs-cmd-app .ph th { font-size: 11px; font-weight: 700; color: var(--ec-muted); text-align: center; padding: 2px; }
#ehs-cmd-app .ph tbody th, #ehs-cmd-app .ph tfoot th { text-align: left; font-size: 12.5px; color: var(--ec-text); white-space: nowrap; padding-right: 10px; }
#ehs-cmd-app .ph td { padding: 0; }
#ehs-cmd-app .ph td i { display: grid; place-items: center; height: 30px; border-radius: 7px; font-style: normal; font-size: 11.5px; font-weight: 700; background: color-mix(in srgb, var(--ec-text) 4%, transparent); transition: transform .12s; }
#ehs-cmd-app .ph td i:hover { transform: scale(1.12); }
#ehs-cmd-app .ph-t { text-align: center; font-size: 12px; font-weight: 800; padding: 0 6px !important; }
#ehs-cmd-app .ph-peak { color: #0a84ff; }

/* ---------- r3s: Data Hub ---------- */
#ehs-cmd-app .dh-hero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0 14px; }
#ehs-cmd-app .dh-hero > div { padding: 16px; border-radius: 20px; border: 1px solid var(--ec-border); background: radial-gradient(90% 90% at 100% 0%, rgba(10,132,255,.14), transparent 60%), var(--ec-surface); }
#ehs-cmd-app .dh-hero b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.04em; } #ehs-cmd-app .dh-hero small { color: var(--ec-muted); font-size: 12.5px; }
#ehs-cmd-app .dh-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; counter-reset: none; }
#ehs-cmd-app .dh-steps > div { position: relative; padding: 14px 14px 14px 52px; border-radius: 18px; background: color-mix(in srgb, var(--ec-text) 4%, transparent); }
#ehs-cmd-app .dh-steps i { position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; color: #fff; background: linear-gradient(135deg, #0a84ff, #5e5ce6); }
#ehs-cmd-app .dh-steps b { display: block; font-size: 14px; } #ehs-cmd-app .dh-steps small { display: block; color: var(--ec-muted); font-size: 12px; line-height: 1.4; margin-top: 2px; }
#ehs-cmd-app .dh-x { display: grid; gap: 8px; }
#ehs-cmd-app .dh-b { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: block; padding: 13px 16px 13px 58px; border-radius: 16px; border: 1px solid var(--ec-border); background: var(--ec-surface); transition: transform .15s, box-shadow .15s, border-color .15s; }
#ehs-cmd-app .dh-b::before { content: ""; position: absolute; left: 14px; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 9px; background: var(--dh, #8e8e93); box-shadow: 0 6px 16px color-mix(in srgb, var(--dh, #8e8e93) 40%, transparent); }
#ehs-cmd-app .dh-excel { --dh: #1d8a4a; } #ehs-cmd-app .dh-word { --dh: #2b5cd6; } #ehs-cmd-app .dh-ppt { --dh: #d24726; } #ehs-cmd-app .dh-free { --dh: #5e5ce6; }
#ehs-cmd-app .dh-b:hover, #ehs-cmd-app .dh-b:focus-visible { transform: translateY(-1px); border-color: var(--dh); box-shadow: 0 10px 26px rgba(0,0,0,.08); }
#ehs-cmd-app .dh-b b { display: block; font-size: 14.5px; } #ehs-cmd-app .dh-b small { display: block; color: var(--ec-muted); font-size: 12px; line-height: 1.4; margin-top: 2px; padding-right: 70px; }
#ehs-cmd-app .dh-b em { position: absolute; right: 14px; top: 14px; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; color: var(--dh); background: color-mix(in srgb, var(--dh) 14%, transparent); }
#ehs-cmd-app .dh-drop { display: grid; place-items: center; text-align: center; gap: 6px; padding: 34px 18px; border-radius: 20px; border: 2px dashed color-mix(in srgb, #0a84ff 55%, transparent); background: radial-gradient(70% 90% at 50% 0%, rgba(10,132,255,.12), transparent 70%); cursor: pointer; transition: background .15s, border-color .15s; }
#ehs-cmd-app .dh-drop.on, #ehs-cmd-app .dh-drop:hover { border-color: #0a84ff; background: rgba(10,132,255,.14); }
#ehs-cmd-app .dh-drop b { font-size: 16px; } #ehs-cmd-app .dh-drop small { color: var(--ec-muted); font-size: 12.5px; }
#ehs-cmd-app .dh-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
#ehs-cmd-app .dh-rules { margin-top: 12px; font-size: 13px; }
#ehs-cmd-app .dh-last { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: rgba(48,209,88,.12); font-size: 13px; font-weight: 600; }
.dh-prev .dh-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 6px 0 14px; }
.dh-prev .dh-sum > div { padding: 12px; border-radius: 14px; background: rgba(255,255,255,.06); } .dh-prev .dh-sum b { display: block; font-size: 24px; font-weight: 800; } .dh-prev .dh-sum small { color: #98989d; }
.dh-prev .dh-pt { width: 100%; border-collapse: collapse; font-size: 13px; } .dh-prev .dh-pt th, .dh-prev .dh-pt td { padding: 8px 6px; text-align: left; vertical-align: top; } .dh-prev .dh-pt .num { text-align: right; font-variant-numeric: tabular-nums; }
.dh-prev .dh-pt input { width: 18px; height: 18px; accent-color: #0a84ff; }
@media (max-width: 820px) { #ehs-cmd-app .dh-hero, #ehs-cmd-app .dh-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- r3t: data quality ---------- */
#ehs-cmd-app .dq-top { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; align-items: center; position: relative; }
#ehs-cmd-app .dq-ring { width: 96px; height: 96px; transform: rotate(-90deg); }
#ehs-cmd-app .dq-bg { fill: none; stroke: color-mix(in srgb, var(--ec-text) 10%, transparent); stroke-width: 8; }
#ehs-cmd-app .dq-fg { fill: none; stroke-width: 8; stroke-linecap: round; }
#ehs-cmd-app .dq-n { position: absolute; left: 0; top: 50%; width: 96px; margin-top: -20px; text-align: center; }
#ehs-cmd-app .dq-n b { font-size: 28px; font-weight: 800; letter-spacing: -.04em; } #ehs-cmd-app .dq-n small { font-size: 11px; color: var(--ec-muted); }
#ehs-cmd-app .dq-t h3 { margin: 0 0 4px; } #ehs-cmd-app .dq-t p { margin: 0 0 10px; font-size: 13px; color: var(--ec-muted); line-height: 1.45; }
#ehs-cmd-app .dq-list { margin-top: 14px; display: grid; gap: 6px; }
#ehs-cmd-app .dq-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px; border-radius: 14px; background: color-mix(in srgb, var(--ec-text) 4%, transparent); }
#ehs-cmd-app .dq-row b { font-size: 14px; } #ehs-cmd-app .dq-row small { margin-left: 8px; font-size: 11.5px; color: var(--ec-muted); }
#ehs-cmd-app .dq-s { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; color: #fff; }
#ehs-cmd-app .dq-ok { background: linear-gradient(160deg, #34c759, #248a3d); } #ehs-cmd-app .dq-mid { background: linear-gradient(160deg, #ffd60a, #e0a800); color: #1d1d1f; } #ehs-cmd-app .dq-low { background: linear-gradient(160deg, #ff9f0a, #d97706); }
#ehs-cmd-app .dq-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
#ehs-cmd-app .dq-chips em { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; cursor: help; }
#ehs-cmd-app .dq-chips .dq-dup { background: rgba(255,69,58,.14); color: #ff453a; } #ehs-cmd-app .dq-chips .dq-gap { background: rgba(255,159,10,.14); color: #d97706; } #ehs-cmd-app .dq-chips .dq-date { background: rgba(10,132,255,.14); color: #0a84ff; }
#ehs-cmd-app .dh-hist { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ec-border); }
#ehs-cmd-app .dh-hist h4 { margin: 0 0 2px; font-size: 14px; } #ehs-cmd-app .dh-hist > p { margin: 0 0 8px; font-size: 12px; }
#ehs-cmd-app .dh-hp { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--ec-text) 4%, transparent); margin-bottom: 6px; }
#ehs-cmd-app .dh-hp b { display: block; font-size: 13px; } #ehs-cmd-app .dh-hp small { display: block; font-size: 11.5px; color: var(--ec-muted); line-height: 1.35; }
/* RTL: Data Hub buttons and steps */
[dir="rtl"] #ehs-cmd-app .dh-b { padding: 13px 58px 13px 16px; text-align: right; }
[dir="rtl"] #ehs-cmd-app .dh-b::before { left: auto; right: 14px; }
[dir="rtl"] #ehs-cmd-app .dh-b em { right: auto; left: 14px; }
[dir="rtl"] #ehs-cmd-app .dh-b small { padding-right: 0; padding-left: 90px; }
[dir="rtl"] #ehs-cmd-app .dh-steps > div { padding: 14px 52px 14px 14px; }
[dir="rtl"] #ehs-cmd-app .dh-steps i { left: auto; right: 14px; }
[dir="rtl"] #ehs-cmd-app .tb-pts li { padding: 12px 50px 12px 14px; } [dir="rtl"] #ehs-cmd-app .tb-pts li::before { left: auto; right: 12px; }
[dir="rtl"] #ehs-cmd-app .tb-lesson, [dir="rtl"] #ehs-cmd-app .pl-focus { border-left: 0; border-right: 4px solid #ff9f0a; } [dir="rtl"] #ehs-cmd-app .pl-focus { border-right-color: #0a84ff; }
[dir="rtl"] #ehs-cmd-app .pl-list button { text-align: right; }

/* ---------- r3u: Safety culture ---------- */
#ehs-cmd-app .sc-why { margin: 0 0 14px; padding: 12px 16px; border-radius: 16px; background: radial-gradient(80% 120% at 0% 0%, rgba(48,209,88,.14), transparent 60%), color-mix(in srgb, var(--ec-text) 4%, transparent); font-size: 13.5px; line-height: 1.5; }
#ehs-cmd-app .sc-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; } #ehs-cmd-app .sc-h h3 { margin: 0; }
#ehs-cmd-app .sc-trend { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; align-items: end; height: 130px; padding-top: 10px; }
#ehs-cmd-app .sc-trend > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
#ehs-cmd-app .sc-trend i { width: 70%; border-radius: 6px 6px 2px 2px; } #ehs-cmd-app .sc-trend i.ok { background: linear-gradient(180deg, #34c759, #248a3d); } #ehs-cmd-app .sc-trend i.mid { background: linear-gradient(180deg, #ffd60a, #e0a800); } #ehs-cmd-app .sc-trend i.low { background: linear-gradient(180deg, #ff9f0a, #d97706); } #ehs-cmd-app .sc-trend i.none { background: color-mix(in srgb, var(--ec-text) 10%, transparent); }
#ehs-cmd-app .sc-trend small { font-size: 11px; font-weight: 700; color: var(--ec-muted); }
#ehs-cmd-app .sc-bar { display: grid; grid-template-columns: 140px 1fr 32px; gap: 10px; align-items: center; margin: 8px 0; font-size: 13px; }
#ehs-cmd-app .sc-bar i { height: 10px; border-radius: 99px; background: color-mix(in srgb, var(--ec-text) 8%, transparent); overflow: hidden; } #ehs-cmd-app .sc-bar b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffd60a, #ff9f0a, #ff453a); } #ehs-cmd-app .sc-bar em { font-style: normal; font-weight: 800; text-align: right; }
#ehs-cmd-app .sc-moc { display: grid; gap: 10px; }
#ehs-cmd-app .sc-mc { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; padding: 14px; border-radius: 18px; border: 1px solid var(--ec-border); background: var(--ec-surface); }
#ehs-cmd-app .sc-mc.sc-warn { border-color: rgba(255,69,58,.5); box-shadow: 0 0 0 1px rgba(255,69,58,.2), 0 6px 18px rgba(255,69,58,.1); }
#ehs-cmd-app .sc-mt b { display: block; font-size: 15px; } #ehs-cmd-app .sc-mt small { color: var(--ec-muted); font-size: 12px; }
#ehs-cmd-app .sc-steps { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
#ehs-cmd-app .sc-steps button { border: 1px solid var(--ec-border); background: color-mix(in srgb, var(--ec-text) 4%, transparent); color: var(--ec-muted); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
#ehs-cmd-app .sc-steps button.on { background: rgba(48,209,88,.15); border-color: rgba(48,209,88,.5); color: #248a3d; }
#ehs-cmd-app .sc-alert { grid-column: 1 / -1; margin: 0; color: #ff453a; font-weight: 700; font-size: 13px; } #ehs-cmd-app .sc-ma { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; }
#ehs-cmd-app .sc-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; margin-bottom: 16px; }
#ehs-cmd-app .sc-rule { padding: 14px; border-radius: 18px; color: #fff; background: radial-gradient(90% 90% at 100% 0%, rgba(255,69,58,.45), transparent 60%), linear-gradient(160deg, #1c1c1e, #0b0b0d); box-shadow: 0 10px 26px rgba(0,0,0,.18); }
#ehs-cmd-app .sc-ri { display: block; font-size: 28px; margin-bottom: 6px; } #ehs-cmd-app .sc-rule b { display: block; font-size: 14.5px; color: #fff; } #ehs-cmd-app .sc-rule small { display: block; font-size: 12px; color: #d1d1d6; line-height: 1.4; margin-top: 4px; }
#ehs-cmd-app .sc-al { display: grid; gap: 6px; } #ehs-cmd-app .sc-ai { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--ec-text) 4%, transparent); flex-wrap: wrap; }
#ehs-cmd-app .sc-ai b { display: block; font-size: 14px; } #ehs-cmd-app .sc-ai small { color: var(--ec-muted); font-size: 12px; }
@media (max-width: 820px) { #ehs-cmd-app .sc-bar { grid-template-columns: 100px 1fr 28px; } #ehs-cmd-app .sc-mc { grid-template-columns: minmax(0, 1fr); } }
