:where(#rxStudioModal, #rxStudioWorkspace),
:where(#rxStudioModal, #rxStudioWorkspace) * { box-sizing:border-box; }

:where(#rxStudioModal, #rxStudioWorkspace){
  --navy:#0C334D;
  --steel:#245372;
  --bronze:#BB925A;
  --line:rgba(255,255,255,.08);
  --line2:rgba(255,255,255,.06);
  --txt:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.62);
  --shadow:0 36px 110px rgba(0,0,0,.62);
  --r20:22px;
  --r18:18px;
  --r14:14px;
  --r12:12px;
  --btnH:36px;
  --inH:40px;
}

#rxStudioModal.rxHost--modal{
  position:fixed;
  inset:0;
  z-index:9997;
  display:none;
  align-items:center;
  justify-content:center;
  padding:16px;
  background:rgba(0,0,0,.52);
  backdrop-filter:blur(8px);
}

#rxStudioWorkspace.rxHost--workspace{
  position:relative;
  width:100%;
  height:100%;
  min-height:0;
  display:none;
  background:transparent;
  padding:0;
  overflow:hidden;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccShell{
  width:min(1120px, 96vw);
  max-height:92vh;
  display:flex;
  flex-direction:column;
  border-radius:var(--r20);
  overflow:hidden;
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(36,83,114,.28), transparent 60%),
    radial-gradient(900px 500px at 80% 0%, rgba(187,146,90,.18), transparent 55%),
    linear-gradient(180deg, rgba(10,16,24,.92), rgba(8,12,18,.92));
  border:1px solid rgba(255,255,255,.08);
  box-shadow:var(--shadow);
  position:relative;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccShell:before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:2px;
  background:linear-gradient(90deg, transparent, rgba(187,146,90,.55), transparent);
  opacity:.8;
  pointer-events:none;
}

#rxStudioWorkspace.rxHost--workspace .iccShell{
  width:100%;
  max-height:none;
  height:100%;
  min-height:0;
  border-radius:18px;
  box-shadow:0 18px 70px rgba(0,0,0,.35);
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccHdr{
  padding:12px 16px;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccTitle{
  color:var(--txt);
  font-size:15px;
  letter-spacing:.15px;
  font-weight:660;
  line-height:1.15;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccMeta{
  margin-top:4px;
  color:var(--muted);
  font-weight:520;
  font-size:12.5px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:64ch;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccHdrBtns{
  display:flex;
  gap:8px;
  align-items:center;
  flex-shrink:0;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccDivider{
  height:1px;
  background:linear-gradient(90deg, transparent, var(--line), transparent);
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccBody{
  display:grid;
  grid-template-columns:1fr 1.05fr;
  gap:14px;
  padding:12px 16px 16px;
  overflow:hidden;
  flex:1 1 auto;
  min-height:0;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccBody--workspace{
  grid-template-columns:1fr;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccCol{
  display:flex;
  flex-direction:column;
  gap:12px;
  min-width:0;
  min-height:0;
  overflow:hidden;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccRow{
  display:flex;
  gap:10px;
  align-items:center;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccRow--wrap{
  flex-wrap:wrap;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccSec{
  background:linear-gradient(180deg, rgba(0,0,0,.16), rgba(0,0,0,.10));
  border:1px solid var(--line2);
  border-radius:var(--r18);
  padding:10px 12px;
  box-shadow:0 14px 40px rgba(0,0,0,.28);
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccSecTitle{
  color:var(--txt);
  font-weight:600;
  font-size:12.5px;
  letter-spacing:.2px;
  text-transform:uppercase;
  opacity:.9;
  margin-bottom:8px;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccPanel{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
  min-height:0;
  overflow:hidden;
  flex:1 1 auto;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccPanelPad{
  border:1px solid var(--line2);
  border-radius:var(--r18);
  padding:10px;
  background:rgba(0,0,0,.10);
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccList{
  overflow:auto;
  overscroll-behavior:contain;
  border:1px solid var(--line2);
  border-radius:var(--r18);
  background:rgba(0,0,0,.10);
  box-shadow:0 14px 40px rgba(0,0,0,.22);
  min-height:220px;
  flex:1 1 auto;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccListPad{ padding:10px; }

:where(#rxStudioModal, #rxStudioWorkspace) .iccH2{
  color:var(--txt);
  font-weight:640;
  font-size:13.5px;
  letter-spacing:.1px;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccMuted{
  color:var(--muted);
  font-weight:520;
  font-size:12px;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccMsgLine{
  min-height:18px;
  padding-left:2px;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccInput,
:where(#rxStudioModal, #rxStudioWorkspace) .rxInput{
  height:var(--inH);
  padding:8px 11px;
  border-radius:var(--r14);
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.14);
  color:var(--txt);
  outline:none;
  font-weight:520;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccInput::placeholder,
:where(#rxStudioModal, #rxStudioWorkspace) .rxInput::placeholder{
  color:rgba(255,255,255,.42);
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccInput:focus,
:where(#rxStudioModal, #rxStudioWorkspace) .rxInput:focus{
  border-color:rgba(187,146,90,.32);
  box-shadow:0 0 0 4px rgba(187,146,90,.12);
  background:rgba(0,0,0,.16);
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccBtn,
:where(#rxStudioModal, #rxStudioWorkspace) .rxBtn,
:where(#rxStudioModal, #rxStudioWorkspace) .rxBtnGhost{
  height:var(--btnH);
  padding:0 12px;
  border-radius:var(--r14);
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.14);
  color:var(--txt);
  font-weight:600;
  cursor:pointer;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccBtn[disabled],
:where(#rxStudioModal, #rxStudioWorkspace) .rxBtn[disabled],
:where(#rxStudioModal, #rxStudioWorkspace) .rxBtnGhost[disabled]{
  opacity:.55;
  cursor:not-allowed;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccBtnSoft{
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.10));
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccBtnPrimary{
  color:rgba(10,18,26,.95);
  border-color:rgba(0,0,0,.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,0)),
    linear-gradient(135deg, rgba(187,146,90,1), rgba(187,146,90,.78));
  box-shadow:0 16px 44px rgba(187,146,90,.22), 0 14px 40px rgba(0,0,0,.30);
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccTabs{
  display:flex;
  gap:10px;
  align-items:center;
  padding-left:2px;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccTab{
  position:relative;
  height:32px;
  padding:0 10px;
  border-radius:var(--r12);
  border:1px solid transparent;
  background:transparent;
  color:rgba(255,255,255,.70);
  font-weight:600;
  cursor:pointer;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccTab.on{
  color:rgba(255,255,255,.92);
  background:rgba(255,255,255,.04);
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccTab.on:after{
  content:"";
  position:absolute;
  left:10px;
  right:10px;
  bottom:4px;
  height:2px;
  border-radius:999px;
  background:linear-gradient(90deg, transparent, rgba(187,146,90,.95), transparent);
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccTextArea{
  width:100%;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.14);
  color:var(--txt);
  padding:10px 11px;
  outline:none;
  font-weight:520;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccTextArea:focus{
  border-color:rgba(187,146,90,.32);
  box-shadow:0 0 0 4px rgba(187,146,90,.12);
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccList,
:where(#rxStudioModal, #rxStudioWorkspace) [data-rx="libList"],
:where(#rxStudioModal, #rxStudioWorkspace) [data-rx="favList"],
:where(#rxStudioModal, #rxStudioWorkspace) [data-rx="rightList"],
:where(#rxStudioModal, #rxStudioWorkspace) [data-rx="panelTpl"],
:where(#rxStudioModal, #rxStudioWorkspace) [data-gdock="meds"],
:where(#rxStudioModal, #rxStudioWorkspace) [data-gdock="regs"]{
  scrollbar-width:thin;
  scrollbar-color:rgba(187,146,90,.45) rgba(0,0,0,.18);
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccList::-webkit-scrollbar,
:where(#rxStudioModal, #rxStudioWorkspace) [data-rx="libList"]::-webkit-scrollbar,
:where(#rxStudioModal, #rxStudioWorkspace) [data-rx="favList"]::-webkit-scrollbar,
:where(#rxStudioModal, #rxStudioWorkspace) [data-rx="rightList"]::-webkit-scrollbar,
:where(#rxStudioModal, #rxStudioWorkspace) [data-rx="panelTpl"]::-webkit-scrollbar,
:where(#rxStudioModal, #rxStudioWorkspace) [data-gdock="meds"]::-webkit-scrollbar,
:where(#rxStudioModal, #rxStudioWorkspace) [data-gdock="regs"]::-webkit-scrollbar{
  width:10px;
  height:10px;
}

:where(#rxStudioModal, #rxStudioWorkspace) .iccList::-webkit-scrollbar-thumb,
:where(#rxStudioModal, #rxStudioWorkspace) [data-rx="libList"]::-webkit-scrollbar-thumb,
:where(#rxStudioModal, #rxStudioWorkspace) [data-rx="favList"]::-webkit-scrollbar-thumb,
:where(#rxStudioModal, #rxStudioWorkspace) [data-rx="rightList"]::-webkit-scrollbar-thumb,
:where(#rxStudioModal, #rxStudioWorkspace) [data-rx="panelTpl"]::-webkit-scrollbar-thumb,
:where(#rxStudioModal, #rxStudioWorkspace) [data-gdock="meds"]::-webkit-scrollbar-thumb,
:where(#rxStudioModal, #rxStudioWorkspace) [data-gdock="regs"]::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg, rgba(187,146,90,.55), rgba(187,146,90,.30));
  border-radius:999px;
  border:2px solid rgba(0,0,0,.18);
}

:where(#rxStudioModal, #rxStudioWorkspace) [data-rx="panelLib"]{
  min-height:0;
  flex:1 1 auto;
  overflow:hidden;
}

:where(#rxStudioModal, #rxStudioWorkspace) [data-rx="libList"]{
  display:flex;
  flex-direction:column;
  min-height:0;
  height:100%;
  flex:1 1 auto;
  overflow:hidden;
}

:where(#rxStudioModal, #rxStudioWorkspace) [data-rx="libList"] [data-gdock="root"]{
  display:flex;
  flex-direction:column;
  min-height:0;
  height:100%;
  flex:1 1 auto;
}

:where(#rxStudioModal, #rxStudioWorkspace) [data-rx="libList"] .gd-main{
  min-height:0 !important;
  height:100% !important;
}

:where(#rxStudioModal, #rxStudioWorkspace) [data-rx="libList"] .gd-col{
  min-height:0 !important;
  height:100% !important;
  overflow:hidden !important;
}

:where(#rxStudioModal, #rxStudioWorkspace) [data-gdock="meds"],
:where(#rxStudioModal, #rxStudioWorkspace) [data-gdock="regs"]{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow:auto !important;
}

:where(#rxStudioModal, #rxStudioWorkspace) [data-gdock="medsFooter"]{
  flex:0 0 auto !important;
}