/* CPGCBL EMD R7.13 — three approved themes and one shared industrial layout.
 * This layer deliberately does not modify permission, inventory or Sheet logic.
 */
:root { color-scheme: light; --navw:200px; --r713-blue:#1685e8; --r713-teal:#13a88f; --r713-amber:#eda43a; --r713-coral:#e35f6b; --r713-violet:#8666d4; --r713-ink:#12354b; --r713-radius:12px; }
body[data-theme="light"] {
  color-scheme:light;
  --bg:#edf4f9;--side:#102f48;--panel:#fff;--panel2:#f4f9fc;--panel3:#e7f0f7;--line:#cbdbe8;
  --text:#152c41;--muted:#51687d;--accent:#087cbe;--accent2:#007f9d;--good:#0b866b;--warn:#995b06;--bad:#bb3348;--purple:#7253b1;
  --shadow:0 12px 32px #153c5b15;
}
body[data-theme="dark"] {
  color-scheme:dark;
  --bg:#071622;--side:#081523;--panel:#0d2535;--panel2:#143044;--panel3:#17394d;--line:#31566b;
  --text:#f1f7fb;--muted:#b2c8d6;--accent:#33d5c0;--accent2:#6ab9f6;--good:#3fdbac;--warn:#ffbe63;--bad:#ff8192;--purple:#c19bfb;
  --shadow:0 14px 35px #0004;
}
body[data-theme="hybrid"] {
  color-scheme:light;
  --bg:#eaf2f8;--side:#092940;--panel:#fff;--panel2:#f2f8fc;--panel3:#e3eff7;--line:#c9d9e6;
  --text:#153047;--muted:#4a6379;--accent:#087db8;--accent2:#087994;--good:#0f8972;--warn:#a5670a;--bad:#b93854;--purple:#7254bc;
  --shadow:0 12px 34px #12385618;
}
html,body{min-height:100%;font-size:14px;letter-spacing:normal}
.app{grid-template-columns:var(--navw) minmax(0,1fr)!important;gap:0!important}
.side{padding:11px 9px!important;border-right:1px solid #26465b!important;background:var(--side)!important}
.side :is(.logo b,.navbtn,.side-foot,.side-foot span,.logo small,.navgroup){color:#dcecf5!important}
.side .navgroup{color:#a2c3d8!important;font-size:10px!important;padding:0 9px!important;margin-top:9px!important}
.side .logo{gap:9px!important;padding:5px 5px 12px!important}
.side .logo b{font-size:13px!important}.side .logo small{font-size:11px!important}
.side .nav{gap:3px!important}.side .navbtn{padding:8px 10px!important;min-height:36px;border-radius:9px!important;font-size:12px!important}
.side .navbtn.active,.side .navbtn[aria-current="page"]{background:#13537a!important;border-left:2px solid #3cd3dd!important;box-shadow:none!important;color:#fff!important}
.side .navbtn:hover{background:#1b4966!important}
.side .side-foot{padding:9px 5px 0!important;font-size:11px!important;line-height:1.55!important}
.side .sidebtn{min-height:34px!important;background:#15394f!important;color:#eef6fa!important;border-color:#42718a!important}
.main{width:100%;min-width:0;margin:0!important;overflow:visible}
.content{margin:0!important;max-width:none!important;padding:10px 13px 26px!important;min-width:0}
.top{height:58px!important;min-height:58px!important;padding:0 14px!important;gap:6px!important;background:var(--panel)!important;backdrop-filter:blur(10px)}
.top .title{font-size:15px!important}.top small{font-size:11px!important}
.top .top-brand{min-width:140px;max-width:250px}.top .spacer{min-width:0}
.top .btn{min-height:32px!important;padding:6px 9px!important;font-size:12px!important;white-space:nowrap}
.top .freshness{font-size:11px!important;white-space:nowrap}
.profile-chip{max-width:205px!important;min-width:145px!important;flex-shrink:0}
.r5-shell,#content .r79-bearing-shell{width:100%;min-width:0;max-width:none!important}
.r5-hero{display:grid!important;grid-template-columns:minmax(210px,1fr) 138px minmax(305px,44%)!important;align-items:center!important;gap:11px!important;min-height:98px!important;padding:11px 14px!important;margin:0 0 9px!important;border-radius:13px!important;background:linear-gradient(108deg,var(--panel) 0%,var(--panel2) 68%,color-mix(in srgb,var(--panel2) 75%,var(--accent2) 25%))!important;overflow:hidden!important}
.r5-hero>div:first-child{position:relative;z-index:2;min-width:0}
.r5-hero h1{font-size:23px!important;letter-spacing:-.024em!important;line-height:1.18!important;margin:2px 0 3px!important}
.r5-hero p{font-size:12px!important;line-height:1.42!important;max-width:690px!important;color:var(--muted)!important}
.r5-kicker{font-size:10px!important;letter-spacing:.11em!important;font-weight:850!important}
.r5-hero-actions{grid-column:3!important;position:relative!important;z-index:3!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:5px!important;flex-wrap:wrap!important;min-width:0!important;max-width:100%!important}
.r5-hero-actions .btn{min-height:33px;padding:6px 9px!important;font-size:12px!important}
.r713-hero-art{grid-column:2;grid-row:1;display:grid;place-items:center;position:relative;z-index:1;width:138px;height:84px;pointer-events:none;opacity:1}
.r713-hero-art svg{width:138px;height:84px;overflow:visible;stroke:var(--r713-hero-primary,var(--accent));stroke-width:2;stroke-linecap:round;stroke-linejoin:round;fill:none;filter:drop-shadow(0 2px 8px #3474b21a)}
.r713-hero-art .r713-engine{transform-origin:62px 44px;animation:r713-rotor 19s linear infinite}
.r713-hero-art .r713-pulse{stroke-dasharray:7 8;animation:r713-flow 6s linear infinite}
.r713-hero-art .r713-spark{fill:var(--r713-hero-secondary,#f2a23b);stroke:var(--r713-hero-secondary,#f2a23b);animation:r713-glow 3.5s ease-in-out infinite}
.r713-hero-art .r713-frame{stroke:var(--r713-hero-secondary,#15a88f);opacity:.76}
@keyframes r713-rotor{to{transform:rotate(360deg)}}
@keyframes r713-flow{to{stroke-dashoffset:-90}}
@keyframes r713-glow{50%{opacity:.45;filter:drop-shadow(0 0 5px currentColor)}}
/* Earlier positioned bearing and greasing decorations must never cover search/export controls. */
.r79-bearing-shell .r710-hero-bearing.r7102-bearing-hero-art,
.r712-grease-hero-art{display:none!important}
.r79-bearing-shell .r7102-hero-copy{display:none!important}
.r79-bearing-shell .r5-hero{grid-template-columns:minmax(230px,1fr) 128px minmax(325px,46%)!important;min-height:96px!important}
.r79-bearing-shell .r5-hero-actions{gap:5px!important}
.r79-bearing-shell .r7102-export-tools{display:flex!important;align-items:center;justify-content:flex-end;flex-wrap:wrap!important;gap:5px!important;margin:0!important}
.r79-bearing-shell #r7102ExportScope{max-width:135px!important;min-height:32px!important}
.r79-bearing-shell .r712-export-menu .btn{padding:5px 8px!important}
.r79-bearing-shell .r7102-scope-label{display:none!important}
.r5-kpis{gap:8px!important;margin:0 0 10px!important}
.r5-kpi,.r79-bearing-shell .r79-bearing-kpis>.r79-kpi{min-height:76px!important;padding:9px 11px!important;border-radius:10px!important;box-shadow:none!important;background:var(--panel)!important}
.r5-kpi small,.r79-bearing-shell .r79-bearing-kpis>.r79-kpi small{font-size:11px!important;font-weight:750!important;letter-spacing:.02em!important;line-height:1.28!important;color:var(--muted)!important}
.r5-kpi b,.r79-bearing-shell .r79-bearing-kpis>.r79-kpi b{font-size:24px!important;line-height:1.05!important;margin:4px 0 3px!important;color:var(--text)!important}
.r5-kpi span{font-size:11px!important;line-height:1.25!important}
.r5-grid{gap:9px!important}.r5-card,.r79-panel-card{border-radius:12px!important;padding:12px!important;min-width:0}
.r5-card-head{margin-bottom:8px!important}.r5-card-head h3{font-size:15px!important}.r5-card-head p{font-size:12px!important;line-height:1.4!important}
.r5-chart{height:215px!important;min-height:190px}.r5-chart.sm{height:205px!important}
.r5-status-card{padding:8px!important;background:var(--panel2)!important}.r5-status-card span{font-size:11px!important}
.r5-status-card b{font-size:18px!important}
.r5-tabs,.r79-stable-tabs{padding:4px!important;margin-bottom:8px!important;gap:4px!important;border-radius:10px!important}
.r5-tabs button,.r79-stable-tabs button{min-height:33px!important;padding:6px 10px!important;font-size:12px!important}
.r5-filter,.r79-bearing-filter{padding:6px!important;gap:7px!important;margin-bottom:8px!important;border-radius:10px!important}
.r5-filter input,.r5-filter select,.r79-bearing-filter input{font-size:13px!important;min-height:33px!important}
.btn,.r5-badge,.r79-bearing-shell .r5-badge,.r5-status-card{font-variant-numeric:tabular-nums}
:is(.btn,button,input,select,textarea):focus-visible{outline:2px solid var(--accent)!important;outline-offset:2px!important}
:where(.table,.r5-table,.r79-panel-card table) th{font-size:12px!important;letter-spacing:.012em!important;color:var(--text)!important;padding:9px 8px!important}
:where(.table,.r5-table,.r79-panel-card table) td{font-size:13px!important;line-height:1.42!important;padding:8px!important;color:var(--text)!important;vertical-align:middle!important}
#content :is(.table,.r79-panel-card table) th{font-size:12px!important}
#content :is(.table,.r79-panel-card table) td{font-size:13px!important}
.r5-tablewrap,.tablewrap{border-radius:10px!important}
.r5-table tbody tr:nth-child(even) td{background:color-mix(in srgb,var(--panel2) 60%,var(--panel))}
.r5-table tbody tr:hover td{background:color-mix(in srgb,var(--accent) 8%,var(--panel))!important}
.r5-table-toolbar{gap:6px!important;padding:6px 5px!important}
.r5-table-toolbar :is(.btn,select){min-height:32px!important}
.r712-bottom-pager{padding:9px 5px!important;min-height:45px}
.r79-bearing-shell .r79-bearing-metrics>*,.r79-bearing-shell .r79-tech-grid>*{border-radius:9px!important}
/* Shared global side drawer: a single scroll area, the same compact width everywhere. */
.drawer{background:rgba(5,16,27,.66)!important;backdrop-filter:blur(5px)}
.drawerpanel{width:min(676px,100vw)!important;min-width:0!important;max-width:100vw!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;background:var(--panel)!important}
.drawerhead{position:relative!important;flex:0 0 auto;min-height:56px!important;padding:9px 12px!important;background:var(--panel2)!important;gap:8px!important;border-bottom:1px solid var(--line)!important}
.drawerhead b{font-size:16px!important;line-height:1.2!important}.drawerhead small{font-size:11px!important;line-height:1.3!important}
.drawerhead .btn{padding:6px 10px!important;min-height:33px!important}
.drawerbody{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;padding:11px 12px 18px!important}
.drawerbody .r5-detail-grid,.drawerbody .detailgrid{gap:7px!important}
.drawerbody .r5-detail,.drawerbody .detail{padding:8px 10px!important;min-height:0!important;border-radius:8px!important}
.drawerbody :is(.r5-detail,.detail) small{font-size:11px!important;color:var(--muted)!important;letter-spacing:.01em!important}
.drawerbody :is(.r5-detail,.detail) b{font-size:14px!important;color:var(--text)!important;overflow-wrap:anywhere}
.drawerbody :is(h2,h3){line-height:1.24!important}.drawerbody p{line-height:1.52!important}
.drawerbody .r79-catalog-grid{gap:10px!important}
.drawerbody .r79-catalog-image{max-height:205px!important}
.drawerbody :is(input,select,textarea){font-size:14px!important;min-height:35px;max-width:100%}
.drawerbody .r711-motor-results{color:var(--text)!important;background:var(--panel)!important;border-color:var(--line)!important;max-height:230px!important}
.drawerbody .r711-motor-results :is(button,li,[role="option"]){color:var(--text)!important;font-size:12px!important;line-height:1.45!important;background:var(--panel)!important}
.drawerbody .r711-motor-results :is(button,li,[role="option"]):hover{background:var(--panel3)!important}
.drawerbody .r711-motor-hint,.drawerbody .r711-motor-scope{color:var(--muted)!important;font-size:12px!important}
.r79-bearing-shell .r79-tech-grid>*:nth-last-child(-n+2){grid-column:auto!important}
/* Greasing compact tiles, preserving their existing click-to-filter logic. */
.r712-grease-summary{margin-bottom:8px!important}.r712-kpi-row{gap:7px!important}
.r712-kpi-tile{min-height:70px!important;padding:8px 11px!important;border-radius:10px!important;background:var(--panel)!important}
.r712-kpi-tile :is(small,span){font-size:11px!important;line-height:1.3!important}
.r712-kpi-tile b{font-size:23px!important;line-height:1.08!important;margin:4px 0!important}
.r712-grease-group{margin-bottom:7px!important}.r712-summary-heading{font-size:12px!important}
.r712-filter-table td{font-size:12px!important}
/* Semantically colored chart cards; hybrid looks like a control room only where analytics belong. */
body[data-theme="hybrid"] #content .r5-card:has(.r5-chart){background:#10293a!important;border-color:#2d556a!important;color:#eff8ff!important}
body[data-theme="hybrid"] #content .r5-card:has(.r5-chart) :is(.r5-card-head h3,.r5-card-head p,.r5-legend span){color:#d5e6f2!important}
body[data-theme="hybrid"] .r712-grease-focus{background:var(--panel)!important}
/* Hybrid and A retain a deep navigation rail, but data/form regions are crisp. */
body[data-theme="light"] :is(.r5-card,.r79-panel-card,.modal,.drawerpanel){box-shadow:0 2px 9px #173b5512!important}
body[data-theme="dark"] :is(.r5-card,.r79-panel-card,.modal,.drawerpanel){box-shadow:0 2px 16px #0003!important}
body[data-theme="hybrid"] .top{background:#fff!important}
body[data-theme="dark"] .top{background:#102333!important}
body[data-theme="dark"] .r79-bearing-shell .r79-panel-card :is(td,th){color:var(--text)!important}
body[data-theme="dark"] .r79-bearing-shell .r7102-catalog-turntable{background:#fff!important}
body[data-theme="hybrid"] .r7102-export-tools select{background:#fff!important;color:#153047!important}
/* AI window / login retain accessible controls without old decorative clutter. */
#loginModal.r712-login .r7102-login-scene{width:100%;max-width:295px}
#loginModal.r712-login .r710-login-art{min-height:250px!important}
#loginModal.r712-login .r710-login-form p{font-size:12px!important}
.r74-assistant-head{overflow:hidden!important}
.r74-assistant-head .r713-hero-art{float:right;margin-right:22px}
.theme-choice{border-radius:12px!important;min-width:0;min-height:143px!important;padding:10px!important}
.theme-choice .theme-preview{height:62px!important;border:1px solid #ffffff27;border-radius:9px!important}
.theme-choice b{font-size:13px!important;line-height:1.3!important}.theme-choice small{font-size:11px!important;line-height:1.35!important}
.theme-choice.active{border-color:var(--accent)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 16%,transparent)!important}
.theme-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
/* No unsupported animation when user explicitly prefers reduced motion. */
@media(prefers-reduced-motion:reduce){.r713-hero-art *, .r5-card,.r5-kpi{animation:none!important;transition:none!important}}
@media(max-width:1350px){:root{--navw:185px}.top{gap:4px!important}.top .freshness{display:none}.r5-hero{grid-template-columns:minmax(180px,1fr) 88px minmax(270px,46%)!important}.r713-hero-art,.r713-hero-art svg{width:88px}.r5-hero-actions{max-width:430px!important}.top .profile-copy small{display:none}}
@media(max-width:1080px){.r5-hero{grid-template-columns:minmax(0,1fr) minmax(0,auto)!important}.r713-hero-art{display:none!important}.r5-hero-actions{grid-column:2!important}.r79-bearing-shell .r5-hero{grid-template-columns:minmax(0,1fr) minmax(0,auto)!important}.r5-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important}.r79-bearing-shell .r79-bearing-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important}.top #printBtn,.top #topThemeBtn{display:none}}
@media(max-width:760px){:root{--navw:0px}.app{grid-template-columns:minmax(0,1fr)!important}.side{width:min(250px,85vw)!important;box-shadow:0 18px 42px #0004}.content{padding:9px 9px 22px!important}.top{padding:0 9px!important}.top #aiBtn,.top #refreshBtn{display:none}.r5-hero,.r79-bearing-shell .r5-hero{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:7px!important;padding:11px 12px!important}.r5-hero h1{font-size:21px!important}.r5-hero-actions{max-width:100%!important;justify-content:flex-start!important}.r5-kpis,.r79-bearing-shell .r79-bearing-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}.r5-kpi{min-height:75px!important}.r5-chart.sm,.r5-chart{height:210px!important}.drawerpanel{width:100vw!important}.theme-grid{grid-template-columns:1fr!important}.theme-choice{min-height:105px!important}.r5-grid>*{grid-column:1/-1!important}}

/* Fallback page/assistant headers that do not use the shared R5 hero. */
#content :is(.r74-assistant-head,.page-hero,.r4-hero,.daily-hero):has(.r713-hero-art){position:relative;display:flex;align-items:center;flex-wrap:wrap;min-height:92px;padding-right:16px;}
#content :is(.r74-assistant-head,.page-hero,.r4-hero,.daily-hero)>.r713-hero-art{grid-column:auto;grid-row:auto;flex:0 0 112px;margin-left:auto;}
@media(max-width:1080px){#content :is(.r74-assistant-head,.page-hero,.r4-hero,.daily-hero)>.r713-hero-art{display:none}}
