/* R7.10.2 Global EMD polish: no changes to maintenance data or backend.
   Accessible light palette, multi-module sign-in, compact tables, genuine catalog-photo motion. */

/* Light theme: chromatic surfaces instead of white-on-white. Applied globally. */
body[data-theme="light"]{
  --bg:#eaf2f8;--panel:#ffffff;--panel2:#f2f8fc;--line:#c8dae6;
  --text:#142f43;--muted:#526b7e;--accent:#087e9c;--accent2:#4f6dca;
  --good:#157f61;--warn:#af671e;--bad:#bc4057;
  color:var(--text);
  background:radial-gradient(ellipse at 14% 10%,#d4f0f1 0,transparent 35%),radial-gradient(ellipse at 92% 6%,#e2e3f9 0,transparent 36%),#edf4f9;
}
body[data-theme="light"] .main,body[data-theme="light"] .content{
  background:transparent;
}
body[data-theme="light"] .top{
  background:linear-gradient(105deg,#f5fdff 0%,#eff6fd 50%,#f2efff 100%)!important;
  border-bottom:1px solid #c1dce9!important;
  box-shadow:0 2px 10px rgba(19,80,120,.035);
}
body[data-theme="light"] .top .title{color:#102f45}
body[data-theme="light"] .side{
  background:linear-gradient(165deg,#193b56 0%,#0d2d47 52%,#102a3c 100%)!important;
  border-right:1px solid #2d5770!important;
  color:#edf7ff!important;
}
body[data-theme="light"] .side .logo,
body[data-theme="light"] .side .navgroup,
body[data-theme="light"] .side .side-foot,
body[data-theme="light"] .side :is(.logo b,.logo small,.side-foot span){color:#e8f5fc!important}
body[data-theme="light"] .side .navgroup{color:#a3c7dc!important;letter-spacing:.13em}
body[data-theme="light"] .side .navbtn{
  color:#e1f1fa!important;border-color:transparent;
  transition:background .15s ease,transform .15s ease,border-color .15s ease;
}
body[data-theme="light"] .side .navbtn:hover{
  background:#ffffff14!important;transform:translateX(2px);
}
body[data-theme="light"] .side .navbtn.active,
body[data-theme="light"] .side .navbtn[aria-current="page"]{
  background:linear-gradient(90deg,#20c8ca38,#3f8aff27)!important;
  border-left:3px solid #45ded6!important;color:#fff!important;
}
body[data-theme="light"] .side .sidebtn,
body[data-theme="light"] .side-foot .btn{
  color:#e6f9ff!important;background:#ffffff12!important;border:1px solid #6fa8bb55!important;
}
body[data-theme="light"] .brandmark{
  background:linear-gradient(145deg,#0fc6c5,#3c79cb)!important;
  color:white!important;border:1px solid #a7ffff55;box-shadow:0 5px 17px #00c4e329;
}
body[data-theme="light"] :is(.r5-card,.r79-panel-card,.card,.r5-tabs,.r5-filter,.r5-hero,.modal,.drawerpanel){
  border-color:#c4dae7;
  box-shadow:0 7px 24px rgba(35,83,128,.06);
}
body[data-theme="light"] :is(.r5-card,.r79-panel-card,.card){
  background:linear-gradient(150deg,#ffffff,#f9fcff)!important;
}
body[data-theme="light"] .r5-hero{
  background:linear-gradient(109deg,#e2f5f7 0%,#f0f8fc 52%,#ece9fb 100%)!important;
  border:1px solid #afd6e3!important;
  box-shadow:inset 4px 0 #16a9b4,0 8px 22px rgba(39,109,141,.06);
}
body[data-theme="light"] :is(.r5-tabs,.r79-stable-tabs){
  background:linear-gradient(105deg,#fbfeff,#edf7fd)!important;
  border-color:#c5dbe7;
}
body[data-theme="light"] .r5-tabs button.active,
body[data-theme="light"] .r79-stable-tabs button.active{
  background:linear-gradient(120deg,#d8f4f1,#e6f2ff)!important;
  border-color:#70c6cf!important;color:#056e83!important;
}
body[data-theme="light"] .r5-filter{
  background:linear-gradient(90deg,#f9fdff,#eef9fb)!important;border-color:#c5deea;
}
body[data-theme="light"] .btn.primary{
  background:linear-gradient(120deg,#0d93ae,#367dd1)!important;
  color:#fff!important;border-color:#117ca9!important;
  box-shadow:0 6px 16px #138eae22;
}
body[data-theme="light"] .btn.good{
  background:linear-gradient(120deg,#d7f6e9,#ccf0f5)!important;
  color:#0a6456!important;border-color:#78c8b5!important;
}
body[data-theme="light"] .btn.warn{
  background:#fff5df!important;border-color:#dfbd7e!important;color:#86530f!important;
}
body[data-theme="light"] .top .btn:not(.primary):hover{background:#e1f2fc;border-color:#96c4da}
body[data-theme="light"] :is(.table th,.r79-panel-card table th){
  background:#e8f3f8!important;color:#31546a!important;border-bottom-color:#aecddb;
}
body[data-theme="light"] :is(.table tbody tr:nth-child(even),.r79-panel-card table tbody tr:nth-child(even)){
  background:#f3f8fc!important;
}
body[data-theme="light"] :is(.table tbody tr:hover,.r79-panel-card table tbody tr:hover){
  background:#e9f7fa!important;
}
body[data-theme="light"] .r79-bearing-kpis>.r79-kpi{
  background:linear-gradient(145deg,color-mix(in srgb,var(--kpi) 11%,white),#fff 88%)!important;
  border-top:3px solid var(--kpi)!important;
  border-color:color-mix(in srgb,var(--kpi) 32%,#d2e2ee)!important;
}
body[data-theme="light"] .r79-bearing-kpis>.r79-kpi b{color:#163952!important}
body[data-theme="light"] .r79-bearing-kpis>.r79-kpi small{color:#435c71!important}

/* Global density: preserve legibility while using vertical space intentionally. */
#content :is(.table,.r79-panel-card table) th,
#content :is(.table,.r79-panel-card table) td{
  padding:7px 9px!important;line-height:1.28!important;vertical-align:middle;
}
#content :is(.table,.r79-panel-card table) th{font-size:10.5px!important;letter-spacing:.026em}
#content :is(.table,.r79-panel-card table) td{font-size:12px!important}
#content .r79-bearing-shell .r79-panel-card{padding:9px!important;margin:0!important}
#content .r79-bearing-shell .r5-table-toolbar{padding:4px 2px 8px!important;gap:7px!important;min-height:0!important}
#content .r79-bearing-shell .r79-bearing-kpis>.r79-kpi{
  min-height:80px!important;padding:9px 11px!important;border-radius:12px;
}
#content .r79-bearing-shell .r79-bearing-kpis>.r79-kpi b{font-size:21px!important}
#content .r79-bearing-shell .r79-bearing-filter{margin-top:7px!important;margin-bottom:7px!important;padding:7px!important}
#content .r79-bearing-shell .r79-stable-tabs{margin-bottom:7px!important}
#content .r79-bearing-shell .r5-hero{margin-bottom:8px!important;min-height:78px}
#content .r79-bearing-shell .r5-hero h1,#content .r79-bearing-shell .r5-hero h2{line-height:1.18}
#content .r79-bearing-shell .r5-kpis{gap:7px!important}
.r79-bearing-shell :is(.record-link,.r79-bearing-link){font-weight:760}

/* Export is always computed from the active tab and live query. */
.r7102-export-tools{display:inline-flex;gap:7px;align-items:center;justify-content:flex-end;flex-wrap:wrap;vertical-align:middle;margin-right:7px}
.r7102-scope-label{font-size:11px;font-weight:800;color:var(--muted)}
#r7102ExportScope{font:inherit;font-size:11px;font-weight:740;color:var(--text);background:var(--panel);border:1px solid var(--line);border-radius:9px;padding:7px 23px 7px 8px;max-width:145px;min-height:32px;cursor:pointer}
.r7102-export-count{font-size:10px;color:var(--muted);white-space:nowrap}
.r7102-check-col{width:34px!important;min-width:34px!important;max-width:34px!important;padding:4px 7px!important;text-align:center!important}
.r7102-check-col input{width:15px;height:15px;accent-color:var(--accent);vertical-align:middle;cursor:pointer}
.r7102-check-col:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:-3px}

/* Bearing page technical hero: visible graphics, not ghosted behind controls. */
.r79-bearing-shell .r710-hero-bearing.r7102-bearing-hero-art{
  position:absolute!important;right:clamp(430px,33vw,610px)!important;top:50%!important;
  transform:translateY(-50%)!important;display:flex!important;align-items:center;
  gap:8px!important;opacity:1!important;z-index:1;pointer-events:none;
  filter:drop-shadow(0 2px 5px rgba(8,117,159,.17));
}
.r79-bearing-shell .r7102-hero-svg{width:63px!important;height:63px!important;flex:none;stroke-width:2.5!important;animation:none!important;overflow:visible}
.r7102-hero-svg .ring-outer{stroke:#287bad;fill:color-mix(in srgb,var(--panel) 90%,transparent);stroke-width:4}
.r7102-hero-svg .ring-race{stroke:#22b6bd;fill:transparent;stroke-width:2}
.r7102-hero-svg .ring-inner{stroke:#4776cb;fill:color-mix(in srgb,var(--panel) 91%,transparent);stroke-width:3}
.r7102-hero-svg .ring-core{stroke:#33a6b5;fill:transparent;stroke-width:2}
.r7102-hero-svg .r7102-balls{fill:#65c7d8;stroke:#247ea5;stroke-width:1;transform-origin:50px 50px;animation:r7102Roll 15s linear infinite}
.r7102-hero-copy{display:grid;gap:2px;min-width:100px}
.r7102-hero-copy b{font-size:10px;letter-spacing:.065em;font-weight:850;color:var(--text);white-space:nowrap}
.r7102-hero-copy small{font-size:8.5px;font-weight:750;letter-spacing:.06em;color:var(--accent);white-space:nowrap}
@keyframes r7102Roll{to{transform:rotate(360deg)}}

/* Actual catalog reference photo rotates. Pauses on hover/focus and by button. */
.r79-bearing-shell .r79-catalog-image:after{display:none!important}
.r79-catalog-grid .r7102-catalog-turntable{
  min-height:196px!important;overflow:hidden;background:#fff!important;
  isolation:isolate;
}
.r79-catalog-grid .r7102-catalog-turntable img{
  width:100%;height:196px;object-fit:contain;background:white;padding:18px;
  transform-origin:center center;will-change:transform;
  animation:r7102CatalogPhotoSpin 34s linear infinite!important;
}
.r79-catalog-grid .r7102-catalog-turntable:hover img,
.r79-catalog-grid .r7102-catalog-turntable:focus-visible img,
.r79-catalog-grid.r7102-rotation-paused .r7102-catalog-turntable img{
  animation-play-state:paused!important;
}
@keyframes r7102CatalogPhotoSpin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
.r7102-catalog-motion-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-top:7px}
.r7102-catalog-motion-bar span{font-size:10px;color:var(--muted)}
.r7102-catalog-toggle{font-size:10px!important;min-height:30px;padding:5px 9px!important}

/* Login is for the entire EMD workspace, not only bearings. */
.r710-loginmodal{width:min(785px,calc(100vw - 24px))!important}
.r7102-login-art{
  background:radial-gradient(circle at 30% 24%,#1d81914b,transparent 56%),radial-gradient(circle at 87% 83%,#735ac44a,transparent 55%),linear-gradient(135deg,#0b2b3f 0%,#102f4d 56%,#19264c 100%)!important;
  min-height:322px!important;padding:20px 12px!important;
}
.r7102-login-scene{position:relative;width:min(100%,310px);height:auto;overflow:visible;filter:drop-shadow(0 9px 14px #02203444)}
.r7102-login-scene .r7102-circuit{fill:none;stroke:#6bbbd3;stroke-width:1.3;opacity:.55;animation:r7102Circuit 22s linear infinite;transform-origin:160px 123px}
.r7102-login-scene .r7102-link{fill:none;stroke:#75bfd8;stroke-width:1.5;stroke-dasharray:4 6;opacity:.55}
.r7102-login-scene .r7102-hub-core{fill:#0c3551;stroke:url(#r7102-g);stroke-width:2.4}
.r7102-login-scene .r7102-hub-core text{stroke:none;fill:#e6fbff}
.r7102-login-scene .r7102-system-node{fill:#143c5c;stroke:#72d6dc;stroke-width:2.4;animation:r7102Node 5.6s ease-in-out infinite}
.r7102-login-scene .r7102-system-node>path{fill:none;stroke:#ddfcff;stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round}
.r7102-login-scene .r7102-system-node.node-right{animation-delay:-1.4s;stroke:#96b8fc}
.r7102-login-scene .r7102-system-node.node-bottom{animation-delay:-2.8s;stroke:#ab9df9}
.r7102-login-scene .r7102-system-node.node-left{animation-delay:-4.2s;stroke:#90e3b8}
.r7102-login-art-title{font-size:11px;letter-spacing:.14em;font-weight:850;margin-top:2px;color:#e3f7ff}
.r7102-login-art p{font-size:10px!important;color:#cce3f1!important;line-height:1.8!important;margin-top:8px!important}
.r7102-login-art p span{color:#53dfd9}
.r7102-login-beacon{position:absolute;inset:20px;border:1px solid #ffffff13;border-radius:16px;pointer-events:none}
.r7102-login-art .r710-art-halo,.r7102-login-art .r710-login-bearing{display:none!important}
@keyframes r7102Circuit{to{transform:rotate(360deg)}}
@keyframes r7102Node{50%{filter:drop-shadow(0 0 9px rgba(79,229,238,.6))}}
.r710-login-form h3{font-size:19px!important;color:var(--text)}
.r710-rolechips span{background:color-mix(in srgb,var(--accent) 7%,var(--panel));border-color:color-mix(in srgb,var(--accent) 28%,var(--line))}
.r710-loginmodal .modalhead{border-bottom:1px solid var(--line)}

/* Dark theme gets coherent controls without overriding its chosen palette. */
body[data-theme="dark"] :is(.r5-card,.r79-panel-card){box-shadow:0 9px 24px #0003}
body[data-theme="dark"] .r7102-export-tools select{background:var(--panel2);color:var(--text)}
body[data-theme="dark"] .r79-bearing-shell .r7102-hero-copy{background:transparent}

@media(max-width:1350px){
  .r79-bearing-shell .r710-hero-bearing.r7102-bearing-hero-art{display:none!important}
  .r7102-export-count{display:none}
}
@media(max-width:760px){
  .r7102-login-art{min-height:170px!important;padding:4px 12px!important}
  .r7102-login-scene{width:175px;height:138px}
  .r7102-login-art-title{margin-top:0;font-size:10px}
  .r7102-login-art p{display:none}
  .r7102-export-tools{justify-content:flex-start;max-width:100%}
  #r7102ExportScope{max-width:120px}
  #content :is(.table,.r79-panel-card table) th,#content :is(.table,.r79-panel-card table) td{padding:7px 6px!important}
}
@media(prefers-reduced-motion:reduce){
  .r7102-login-scene .r7102-circuit,.r7102-login-scene .r7102-system-node,
  .r7102-hero-svg .r7102-balls,.r79-catalog-grid .r7102-catalog-turntable img{animation:none!important}
  .r79-bearing-shell .r5-kpi:hover,body[data-theme="light"] .side .navbtn:hover{transform:none!important}
}
