/* Rapid ORBIT Control v2.4.7 — unified readability, themes, tooltips and user-view controls */
:root{
  --ui-body:15px;
  --ui-small:12px;
  --ui-label:13px;
  --ui-heading:20px;
  --top-label-size:13px;
}
body{font-size:var(--ui-body)}
.top-view-switch,.prototype-badge,.view-switch-card{display:none!important}

/* Top status row: NOW / NEXT / WHY use the same label size as mode and status. */
.status-pill b,.top-prompt-chip b,.top-prompt-chip{font-size:var(--top-label-size)!important;font-weight:850;letter-spacing:.025em}
.status-pill small{font-size:10.5px!important;line-height:1.1}
.top-prompt-chip{min-width:66px;padding-inline:10px}
.top-prompt-chip .prompt-dot{width:8px;height:8px}
.icon-button span{font-size:13px}
.clock strong{font-size:15px}
.clock small{font-size:10px}

/* Administrator/user menu now owns view, layout, theme and language. */
.user-popover{width:min(390px,calc(100vw - 20px));max-height:min(760px,calc(100vh - 82px));overflow:auto;padding:12px}
.user-popover .popover-title{font-size:11px;padding:8px 7px 6px}
.user-popover .popover-option{min-height:50px;padding:8px 10px}
.user-popover .popover-option b{font-size:13px}
.user-popover .popover-option small{font-size:11px;line-height:1.35}
.menu-segmented{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:0 6px}
.menu-segmented button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.03);font-size:12px;font-weight:850;cursor:pointer}
.menu-segmented button.active{border-color:rgba(36,152,255,.5);background:rgba(36,152,255,.14);color:var(--blue-2);box-shadow:inset 0 0 0 1px rgba(36,152,255,.08)}
.menu-theme-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:0 6px}
.menu-theme-grid button{display:grid;place-items:center;gap:6px;min-height:62px;padding:7px 4px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.03);font-size:10.5px;font-weight:850;cursor:pointer;text-align:center}
.menu-theme-grid button.active{border-color:rgba(36,152,255,.5);background:rgba(36,152,255,.12)}
.theme-swatch{display:block;width:28px;height:20px;border-radius:5px;border:1px solid rgba(255,255,255,.22)}
.theme-swatch.charcoal{background:linear-gradient(135deg,#252a2f,#090b0e)}
.theme-swatch.white{background:linear-gradient(135deg,#ffffff,#cfd8df)}
.theme-swatch.orbit{background:linear-gradient(135deg,#0c2d48,#03101b)}
.user-popover .popover-footer{min-height:44px;font-size:12px}

/* Consistent readable page typography. */
.panel-title-row h2{font-size:var(--ui-heading)}
.panel-title-row h3{font-size:17px}
.eyebrow{font-size:11px!important;letter-spacing:.09em}
.status-chip,.read-only-chip,.permission-chip,.count-badge{font-size:11px!important}
.panel p,.panel-copy,.info-card p{font-size:13px;line-height:1.5}
.status-list dt,.status-list dd{font-size:13px}
.list-row b{font-size:14px}
.list-row small,.list-row>span:last-child{font-size:11.5px}
.field>span,.field span{font-size:12px;font-weight:750}
.field input,.field select,.field textarea{min-height:42px;font-size:14px}
.tab-strip button,.segmented-control button,.action-button,.primary-button,.secondary-button{font-size:12px}
.data-table{font-size:12.5px}.data-table th{font-size:11.5px}

/* More visible animated speed card. */
.global-speed-card{position:relative;isolation:isolate;overflow:hidden;border-color:rgba(64,184,255,.65)!important;background:linear-gradient(125deg,rgba(7,31,49,.97),rgba(18,83,124,.94) 46%,rgba(8,31,48,.97))!important;box-shadow:0 0 0 1px rgba(46,166,255,.14),0 0 22px rgba(36,152,255,.2),inset 0 0 24px rgba(36,152,255,.12)}
.global-speed-card:before{content:"";position:absolute;z-index:-1;inset:-35% -60%;background:linear-gradient(100deg,transparent 35%,rgba(120,220,255,.2) 48%,rgba(255,255,255,.33) 50%,rgba(120,220,255,.18) 52%,transparent 65%);transform:translateX(-48%);animation:orbit-speed-sweep 3.2s ease-in-out infinite}
.global-speed-card:after{content:"";position:absolute;z-index:-1;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 1px rgba(125,215,255,.12);animation:orbit-speed-pulse 1.8s ease-in-out infinite}
.mode-manual .global-speed-card{border-color:rgba(255,189,66,.68)!important;background:linear-gradient(125deg,rgba(38,29,8,.97),rgba(125,86,18,.92) 46%,rgba(35,26,7,.97))!important;box-shadow:0 0 0 1px rgba(255,189,66,.16),0 0 22px rgba(255,189,66,.22),inset 0 0 24px rgba(255,189,66,.12)}
.mode-service .global-speed-card{filter:saturate(.55)}
.global-speed-copy b{font-size:14px!important}.global-speed-copy small{font-size:10px!important;color:#d8f2ff!important}
@keyframes orbit-speed-sweep{0%,22%{transform:translateX(-48%)}62%,100%{transform:translateX(48%)}}
@keyframes orbit-speed-pulse{0%,100%{opacity:.45}50%{opacity:1}}

/* Coordinates are selectable for motion only in Manual mode. */
.coordinate-cell.motion-readonly{cursor:not-allowed;filter:saturate(.68);opacity:.88}
.coordinate-cell.motion-readonly:hover{border-color:rgba(145,195,232,.15);background:linear-gradient(180deg,rgba(21,42,58,.78),rgba(8,19,29,.84))}
.coordinate-cell.motion-enabled{cursor:pointer;border-color:rgba(36,152,255,.3)}
.coordinate-cell.motion-enabled:hover{box-shadow:0 0 0 1px rgba(36,152,255,.16),0 0 18px rgba(36,152,255,.12)}

/* Reusable information icon and touch tooltip. */
.info-tip{display:inline-grid;place-items:center;width:24px;height:24px;flex:0 0 auto;border:1px solid rgba(111,194,255,.34);border-radius:50%;background:rgba(36,152,255,.09);color:var(--blue-2);font-size:12px;font-weight:900;font-style:normal;line-height:1;cursor:help;user-select:none}
.info-tip:hover,.info-tip:focus-visible{border-color:rgba(111,194,255,.7);background:rgba(36,152,255,.18)}
.orbit-tooltip{position:fixed;z-index:2000;max-width:360px;padding:11px 13px;border:1px solid rgba(94,183,247,.45);border-radius:9px;background:rgba(5,16,25,.98);color:#e9f5fb;box-shadow:0 16px 42px rgba(0,0,0,.5);font-size:13px;line-height:1.45;pointer-events:none}
.orbit-tooltip[hidden]{display:none!important}

/* Charcoal is the default neutral industrial dark appearance. */
body.theme-charcoal{
  --bg:#090b0d;--shell:#111519;--shell-2:#181e23;--panel:rgba(24,30,35,.97);--panel-2:rgba(31,38,44,.97);--panel-3:rgba(39,47,54,.95);
  --line:rgba(200,215,225,.15);--line-strong:rgba(200,215,225,.28);--text:#f5f8fa;--muted:#a8b5bf;--subtle:#76838d;
}
body.theme-charcoal,body.theme-charcoal .prototype-frame{background:radial-gradient(circle at 62% 0,#27313a 0,#11161a 44%,#060809 100%)}
body.theme-charcoal .topbar,body.theme-charcoal .motion-telemetry,body.theme-charcoal .sidebar,body.theme-charcoal .pendant-nav{background:linear-gradient(180deg,rgba(25,31,36,.99),rgba(11,14,17,.99))}

/* Existing blue-black visual identity remains available as ORBIT Dark. */
body.theme-orbit-dark{
  --bg:#02070d;--shell:#07111b;--shell-2:#0b1724;--panel:rgba(12,25,38,.96);--panel-2:rgba(17,33,49,.96);--panel-3:rgba(22,43,60,.92);
  --line:rgba(164,205,235,.16);--line-strong:rgba(164,205,235,.3);--text:#f4f9fd;--muted:#91a8bb;--subtle:#647b8e;
}
body.theme-orbit-dark,body.theme-orbit-dark .prototype-frame{background:linear-gradient(180deg,rgba(14,29,43,.95),rgba(2,8,14,.99)),radial-gradient(circle at 66% 18%,rgba(36,152,255,.1),transparent 40%)}

/* Industrial white appearance. The digital-twin viewport intentionally remains dark for contrast. */
body.theme-industrial-white{
  color-scheme:light;
  --bg:#eef2f4;--shell:#f8fafb;--shell-2:#e6ecef;--panel:rgba(255,255,255,.98);--panel-2:rgba(244,248,250,.98);--panel-3:rgba(232,239,243,.98);
  --line:rgba(38,68,87,.18);--line-strong:rgba(38,68,87,.32);--text:#10212d;--muted:#536b7b;--subtle:#718593;
  --shadow:0 14px 38px rgba(40,63,78,.16);
}
body.theme-industrial-white,body.theme-industrial-white .prototype-frame{background:linear-gradient(180deg,#f6f8f9,#dde5e9);color:var(--text)}
body.theme-industrial-white .topbar,body.theme-industrial-white .motion-telemetry,body.theme-industrial-white .sidebar,body.theme-industrial-white .pendant-nav{background:linear-gradient(180deg,#ffffff,#e8eef1);color:var(--text);box-shadow:0 8px 22px rgba(39,63,77,.12)}
body.theme-industrial-white .panel,body.theme-industrial-white .top-popover,body.theme-industrial-white .context-drawer,body.theme-industrial-white .modal,body.theme-industrial-white .cam-workspace-header{background:rgba(255,255,255,.98);color:var(--text);box-shadow:var(--shadow)}
body.theme-industrial-white .status-pill,body.theme-industrial-white .coordinate-cell,body.theme-industrial-white .frame-button,body.theme-industrial-white .icon-button,body.theme-industrial-white .nav-item,body.theme-industrial-white .pendant-nav button,body.theme-industrial-white .menu-segmented button,body.theme-industrial-white .menu-theme-grid button{background:rgba(255,255,255,.72);color:var(--text)}
body.theme-industrial-white .status-pill.ok,body.theme-industrial-white .status-pill.running{background:rgba(75,165,58,.12);color:#266d21}
body.theme-industrial-white .mode-pill{background:rgba(36,152,255,.12)}
body.theme-industrial-white .coordinate-cell span,body.theme-industrial-white .eyebrow,body.theme-industrial-white .popover-title{color:#176fba}
body.theme-industrial-white input,body.theme-industrial-white select,body.theme-industrial-white textarea{background:#fff;color:#172a36;border-color:rgba(38,68,87,.22)}
body.theme-industrial-white .data-table th,body.theme-industrial-white .settings-table th{background:#e7eef2;color:#395666}
body.theme-industrial-white .top-prompt-chip{background:linear-gradient(180deg,#fff,#edf2f5);color:#243d4c}
body.theme-industrial-white .orbit-tooltip{background:#ffffff;color:#172a36;border-color:rgba(25,118,183,.42);box-shadow:0 14px 36px rgba(35,58,72,.22)}
body.theme-industrial-white .global-speed-card{color:#fff!important}
body.theme-industrial-white .safety-reminder{background:rgba(255,189,66,.12)}
body.theme-industrial-white .workspace{background:transparent}

body.pendant-layout{--top-label-size:14px;--ui-body:16px;--ui-small:12.5px;--ui-label:13.5px;--ui-heading:21px}
body.pendant-layout .status-pill b,body.pendant-layout .top-prompt-chip b,body.pendant-layout .top-prompt-chip{font-size:var(--top-label-size)!important}
body.pendant-layout .status-pill small{font-size:10.5px!important}
body.pendant-layout .pendant-nav button span{font-size:11.5px!important}
body.pendant-layout .pendant-nav button svg{width:25px;height:25px}
body.pendant-layout .panel-title-row h2{font-size:21px}
body.pendant-layout .panel-title-row h3{font-size:18px}
body.pendant-layout .field input,body.pendant-layout .field select,body.pendant-layout .field textarea{font-size:14px}

@media(max-width:1380px){
  body.pendant-layout .compact-status small{display:none}
  body.pendant-layout .status-pill{padding-inline:8px}
  body.pendant-layout .top-prompt-chip{min-width:54px;padding-inline:7px}
  body.pendant-layout .user-menu-button span{max-width:92px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  body.pendant-layout .pendant-nav button span{font-size:10.5px!important}
}
@media(max-width:1120px){
  :root{--top-label-size:12px}
  body.pendant-layout{--top-label-size:12px}
  body.pendant-layout .status-pill small{display:none}
  body.pendant-layout .top-prompt-chip{min-width:48px;padding-inline:5px}
  .clock small{display:none}
}
@media(prefers-reduced-motion:reduce){.global-speed-card:before,.global-speed-card:after{animation:none!important}}
/* Exact parity for every permanent top-row primary label. */
.mode-pill b,.state-pill b,.compact-status b,.status-pill b,.top-prompt-chip b{font-size:var(--top-label-size)!important;font-weight:850;letter-spacing:.025em}
