/* PalletBOSS premium blue visual skin — presentation only.
   Scoped to the cloud-hosted original register; no layout, IDs, routes or business logic are replaced. */
:root{
 --blue:#1264ef;--pale:#e9f2ff;--ink:#10224b;--muted:#60718e;--line:#d9e5f8;
 --bg:#f3f7ff;--white:#fff;--navy:#071c51;
 --pb-cyan:#02cffa;--pb-purple:#7734ef;--pb-gold:#e5a51d;
}
html{background:#f3f7ff}
body{background:radial-gradient(ellipse at 90% -20%,#dcefff 0,transparent 47%),#f3f7ff;color:#12234a;-webkit-font-smoothing:antialiased}
.shell{background:transparent}
.sidebar{
 background:linear-gradient(167deg,#04153a 0%,#071e55 58%,#0b2867 100%)!important;
 color:#edf6ff!important;border-right:1px solid #3a6ee0!important;
 box-shadow:5px 0 24px #091d5316!important;
}
.sidebar .brand{border-bottom:1px solid #ffffff22;margin-bottom:12px}
.sidebar .brand-logo{
 background:linear-gradient(135deg,#00d6fa 0%,#0874ff 49%,#6c37f2 100%)!important;
 color:white!important;box-shadow:0 6px 17px #00cfff55!important;
 border:1px solid #a8eeff70;border-radius:13px!important;
}
.sidebar .brand strong,.sidebar .brand small,.sidebar .brand,.sidebar .side-bottom{color:#f4f8ff!important}
.sidebar .brand small{opacity:.75}
.sidebar .nav button,.sidebar .nav button span{color:#dae9ff!important}
.sidebar .nav button{
 border:1px solid transparent!important;background:transparent!important;
 border-radius:11px!important;transition:background .14s,box-shadow .14s,transform .14s;
}
.sidebar .nav button:hover{background:#1658bc96!important;color:#fff!important;border-color:#6dbaff55!important}
.sidebar .nav button.active{
 background:linear-gradient(110deg,#0748df,#0788ff 68%,#07b3f8)!important;
 color:#fff!important;border-color:#73d8ff99!important;
 box-shadow:0 6px 18px #029dff52!important;
}
.sidebar .side-bottom{border-top:1px solid #ffffff25!important}
.main{background:transparent!important}
.top{border-bottom:1px solid #dce8fa;padding-bottom:15px}
.top h1{color:#0b1e50;font-weight:850}
.top .eyebrow{color:#1264ef}
.subtitle,.caption,.muted{color:#63748d}
.card{
 background:linear-gradient(160deg,#fff 67%,#f8fbff 100%)!important;
 border:1px solid #d7e6fc!important;border-radius:16px!important;
 box-shadow:0 5px 19px #153a8010,0 1px 3px #163b8010!important;
}
.card:hover{border-color:#b9d8ff!important}
.card h2,.card h3,.section-head h2{color:#10295d}
button,.field,input,select,textarea{border-radius:10px}
button{transition:filter .15s,box-shadow .15s}
button:not(:disabled):hover{filter:brightness(1.035)}
button.primary,.primary{
 background:linear-gradient(110deg,#1456ed,#077ff6)!important;
 color:white!important;border:1px solid #3989ff!important;
 box-shadow:0 4px 12px #1767dc31!important;
}
button.secondary,.secondary{background:#e8f1ff!important;color:#1554b5!important;border:1px solid #cddfff!important}
button.neutral,.neutral{background:#eef2fb!important;color:#29416f!important}
button:disabled{opacity:.55;cursor:not-allowed;box-shadow:none!important}
input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible{
 outline:3px solid #09c8ed!important;outline-offset:2px!important;
}
.field,input:not([type="checkbox"]),select,textarea{
 border-color:#cdddf2;background-color:#fff;color:#102450;
}
table{border-collapse:separate;border-spacing:0}
th{background:#f2f7ff;color:#526788;font-weight:750;border-bottom:1px solid #d6e4f7}
td{border-bottom:1px solid #e5ecfa}
tbody tr:hover{background:#f5faff}
.tag{border-radius:8px}
.pill{border:1px solid #b9e7d0}
.register-grid{gap:18px}
.cart{box-shadow:0 7px 26px #18376818!important}
.big-total{color:#0a3cbd}
.product-row,.flow-node{background:#fff;border-color:#d5e5f9;border-radius:12px}
.toolbar button[aria-selected="true"],[role="tab"][aria-selected="true"]{
 background:linear-gradient(115deg,#0f55ef,#086cf1)!important;color:#fff!important;
 border-color:#0c67e7!important;box-shadow:0 4px 13px #175cf137!important;
}
#cloudSubscriptionPanel>section.card:nth-of-type(2){border-top:3px solid #08c8ee!important}
#cloudSubscriptionPanel .form-grid>section.card:nth-child(1){border-top:4px solid #0b91fa!important}
#cloudSubscriptionPanel .form-grid>section.card:nth-child(2){border-top:4px solid #873bef!important}
#cloudSubscriptionPanel .form-grid>section.card:nth-child(3){border-top:4px solid #e4ac24!important}
#cloudSubscriptionPanel .form-grid>section.card:nth-child(2) h4{color:#7131d9}
#cloudSubscriptionPanel .form-grid>section.card:nth-child(3) h4{color:#986310}
#cloudSubscriptionPanel .form-grid>section.card{min-width:0}
#cloudSubscriptionPanel .form-grid>section.card button{max-width:100%}
dialog{border:1px solid #bfd8ff!important;border-radius:18px!important;box-shadow:0 22px 65px #101f5263!important}
dialog::backdrop{background:#071d4ab5}
@media(max-width:1100px){
 .shell{grid-template-columns:205px minmax(0,1fr)}
 .sidebar{padding:14px 8px}
 .main{padding:19px 16px 40px}
 .register-grid{grid-template-columns:minmax(0,1fr)}
 .cart{position:static}
}
@media(max-width:720px){
 .shell{display:block}
 .sidebar{height:auto;position:relative;max-height:none;overflow:visible;padding:10px!important}
 .sidebar .brand{padding:7px 9px;margin-bottom:6px}
 .sidebar .nav{display:flex;flex-direction:row;overflow-x:auto;gap:5px;padding-bottom:4px;scrollbar-width:thin}
 .sidebar .nav button{flex:0 0 auto;font-size:12px;padding:9px 10px}
 .sidebar .nav button span{width:auto;margin-right:5px}
 .sidebar .side-bottom{display:none}
 .main{padding:16px 12px 28px}
 .top{align-items:flex-start;flex-wrap:wrap}
 .top h1{font-size:23px}
 .card{padding:14px}
 .grid.g4,.grid.g3,.grid.g2,.register-grid{grid-template-columns:minmax(0,1fr)}
 .toolbar{gap:6px}
 .toolbar .field{min-width:125px}
 #cloudSubscriptionPanel .form-grid{grid-template-columns:minmax(0,1fr)}
 .tablewrap{max-width:100%;overflow-x:auto}
}
@media(prefers-reduced-motion:reduce){.sidebar .nav button,button{transition:none}}

/* Legacy v6 theme declares .sidebar,.side background !important in later inline
   styles. Scope the premium cloud sidebar more specifically, including when
   stored theme settings update those legacy custom properties. */
html body .shell .sidebar,
html body .sidebar{
 background:linear-gradient(167deg,#04153a 0%,#071e55 58%,#0b2867 100%)!important;
 color:#edf6ff!important;
 border-right-color:#3a6ee0!important;
}
html body .sidebar .brand strong,
html body .sidebar .brand small,
html body .sidebar .side-bottom{color:#edf6ff!important}
html body .sidebar .nav button:not(.active){color:#dae9ff!important}
html body .sidebar .nav button.active{color:#fff!important}

/* Concept-board signature: layered cyan electric arcs and purple ambient glow.
   Purely decorative, screen-only, pointer-transparent and motion-reduced. */
html body .sidebar{isolation:isolate;overflow-x:hidden}
html body .sidebar::before{
 content:"";position:absolute;z-index:-1;pointer-events:none;inset:0;
 background:
  radial-gradient(ellipse 140px 260px at 112% 20%,rgba(0,226,255,.20),transparent 85%),
  radial-gradient(ellipse 260px 320px at -30% 88%,rgba(116,49,246,.24),transparent 80%),
  linear-gradient(153deg,transparent 0 27%,rgba(12,196,255,.08) 29%,transparent 33% 70%,rgba(40,79,235,.14) 74%,transparent 77%);
}
html body .sidebar::after{
 content:"";position:absolute;z-index:-1;pointer-events:none;top:10%;right:-65px;
 width:128px;height:510px;border:2px solid rgba(0,222,252,.34);
 border-left:0;border-radius:50%;transform:rotate(19deg);
 filter:drop-shadow(0 0 9px rgba(0,219,255,.66));
}
html body .top{
 background:linear-gradient(110deg,#fff 65%,#e7f3ff 90%,#f1edff)!important;
 border:1px solid #c5dfff!important;
 box-shadow:0 4px 20px rgba(4,75,163,.09),inset 0 2px 0 rgba(255,255,255,.9)!important;
}
html body .top::before{content:"";display:block;position:absolute;pointer-events:none;
 height:2px;width:clamp(70px,17%,240px);right:5%;top:0;
 background:linear-gradient(90deg,transparent,#02d6fa 40%,#7e47ee 85%,transparent);
 filter:drop-shadow(0 0 6px #00cfff);}
html body .top{position:relative}
html body .card{box-shadow:0 7px 22px #153a8013,0 1px 4px #163b8015!important}
html body .card:focus-within{border-color:#76c8ff!important}
html body button.primary:not(:disabled),html body .primary:not(:disabled){
 background:linear-gradient(120deg,#064fe8 0%,#056dff 64%,#06b7ef 100%)!important;
 box-shadow:0 4px 13px #0759ef30,inset 0 1px 0 #ffffff55!important;
}
@media(max-width:720px){html body .sidebar::after{display:none}}

/* Directly-derived approved PB artwork is displayed with its natural ratio. */
html body .sidebar .brand-logo{width:48px;height:42px;min-width:48px;padding:0;overflow:visible;background:none!important;box-shadow:none!important;border:0!important}
html body .sidebar .brand-logo img{width:100%!important;height:100%!important;object-fit:contain!important;border-radius:0!important;filter:drop-shadow(0 2px 7px rgba(0,215,255,.48))}
html body .sidebar .brand strong{font-weight:850;letter-spacing:-.6px;color:#fff!important}
html body .sidebar .brand strong::first-letter{color:#f8fcff}
html body .sidebar{border-right:2px solid rgba(10,197,255,.75)!important}
html body .shell{box-shadow:inset 0 0 0 1px rgba(8,153,247,.1)}
html body .main:after{content:"";position:fixed;z-index:-1;pointer-events:none;top:0;right:0;width:min(46vw,640px);height:250px;
 background:radial-gradient(ellipse at 85% 10%,rgba(124,70,251,.10),transparent 72%),radial-gradient(ellipse at 30% 0%,rgba(3,199,251,.12),transparent 70%)}
html body .v4-login img[src*="palletboss-approved-pb.webp"]{width:min(240px,100%)!important;max-height:200px;object-fit:contain;background:linear-gradient(160deg,#07225d,#031137);padding:18px;border-radius:20px!important;box-shadow:0 10px 32px #061d5633}
@media(max-width:720px){html body .sidebar .brand-logo{width:44px;min-width:44px;height:38px}}

/* Visual QA: mobile Account header must not crowd the title or controls. */
@media(max-width:720px){
 html body .top{display:flex!important;flex-direction:column!important;gap:6px!important;align-items:stretch!important;padding:12px 14px!important}
 html body .top>div:first-child{min-width:0}
 html body .top-right{display:flex!important;justify-content:flex-start!important;align-items:center!important;max-width:100%!important;min-width:0!important}
 html body .top-right #userBadge{display:inline-flex!important;max-width:100%!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:12px!important;padding:5px 10px!important}
 html body .top h1{font-size:24px!important;line-height:1.22!important}
 html body .top .subtitle{font-size:12px!important}
 html body .sidebar .brand{margin:0 0 5px!important}
 html body .main{min-width:0!important}
}
@media(min-width:721px) and (max-width:1020px){
 html body .top-right #userBadge{font-size:12px!important;max-width:190px;line-height:1.35}
}

/* Approved italic white/cyan PalletBOSS split wordmark composition. */
html body .sidebar .brand .pb-wordmark{display:inline-flex;flex-wrap:nowrap;gap:0;font-family:"Arial Black","Segoe UI",Arial,sans-serif;font-style:italic;font-weight:900;font-size:19px!important;letter-spacing:-.65px!important;white-space:nowrap;line-height:1.25}
html body .sidebar .brand .pb-wordmark span:first-child{color:#f9fdff!important}
html body .sidebar .brand .pb-wordmark span:last-child{color:#0ad6ff!important;text-shadow:0 1px 9px #04d2ff80}
html body .sidebar .brand small{font-size:10px!important;line-height:1.4;color:#e5f4ff!important}
@media(max-width:720px){html body .sidebar .brand .pb-wordmark{font-size:19px!important}}

/* Store Setup uses the existing PalletBOSS components and approved header dimensions. */
html body .sidebar .brand[role="button"]{border-radius:12px;outline-offset:3px;transition:filter .15s}
html body .sidebar .brand[role="button"]:hover{filter:brightness(1.15)}
html body .sidebar .brand[role="button"]:focus-visible{outline:2px solid #0ad6ff}
html body .sidebar .brand small{overflow-wrap:anywhere;max-width:180px}
#cloudStoreSetupPage{width:100%;min-width:0}
#cloudStoreSetupPage .pb-setup-heading{background:linear-gradient(125deg,#fff,#edf7ff)!important}
#cloudStoreSetupPage #setupLocation{max-width:420px;margin-bottom:8px}
#cloudStoreSetupPage .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-bottom:18px}
#cloudStoreSetupPage form{margin-top:12px}
#cloudStoreSetupPage .toolbar{gap:8px;flex-wrap:wrap;margin-top:14px}
#cloudStoreSetupPage .tablewrap{width:100%;overflow-x:auto}
#cloudStoreSetupPage td button{margin:3px;white-space:nowrap}
#cloudStoreSetupPage .label{display:flex;flex-direction:column;gap:6px}
@media(max-width:720px){#cloudStoreSetupPage .form-grid{grid-template-columns:1fr}#cloudStoreSetupPage [role="tablist"] button{flex:1 1 130px}}

@media(min-width:721px) and (max-width:830px){
 html body .shell:not(.v12-collapsed) .sidebar .brand[role="button"]{justify-content:flex-start;padding-left:3px;padding-right:3px;gap:7px}
 html body .shell:not(.v12-collapsed) .sidebar .brand[role="button"]>div:last-child{display:block!important;min-width:0}
 html body .shell:not(.v12-collapsed) .sidebar .brand[role="button"] .pb-wordmark{font-size:17px!important}
 html body .shell:not(.v12-collapsed) .sidebar .brand[role="button"] small{display:block!important;max-width:115px}
}
@media(min-width:721px) and (max-width:1020px){
 html body.pb-store-setup-active .top{display:flex!important;flex-wrap:wrap!important;align-items:flex-start!important}
 html body.pb-store-setup-active .top-right{flex-basis:100%;justify-content:flex-start!important}
 html body.pb-store-setup-active #userBadge{max-width:100%;white-space:normal;line-height:1.35}
}

#modalHost .modal:has(#pbLabelAdjustment) { width: min(960px, 95vw); max-width: 960px; }
#pbLabelAdjustment .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#pbLabelAdjustment .toolbar { flex-wrap: wrap; }
@media (max-width: 720px) {
 #pbLabelAdjustment .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 450px) {
 #pbLabelAdjustment .form-grid { grid-template-columns: 1fr; }
}

/* Scan Studio label artwork uses the same millimetre geometry as the print page. */
.pb-label-stage{display:grid;place-items:center;min-height:165px;padding:16px;background:#dce8f5;border-radius:10px}
#pbLabelCanvas{position:relative;background:white;color:black;box-shadow:0 3px 12px #172c4840;touch-action:none}
#pbLabelArt,#pbLabelBoxes{position:absolute;inset:0}
#pbLabelArt{font-family:Arial,sans-serif;transform-origin:top left;pointer-events:none}
#pbLabelArt *{box-sizing:border-box}
#pbLabelBoxes>[data-part]{position:absolute;outline:1px dashed #4673a7;cursor:move}
#pbLabelBoxes>[data-part].selected,#pbLabelBoxes>[data-part]:focus-visible{outline:2px solid #0472df;z-index:2}
#pbLabelBoxes [data-edge]{display:none;position:absolute;width:12px;height:12px;background:#0472df;border:1px solid white;border-radius:2px}
#pbLabelBoxes .selected [data-edge]{display:block}
#pbLabelBoxes [data-edge=e]{right:-6px;top:calc(50% - 6px);cursor:ew-resize}
#pbLabelBoxes [data-edge=s]{bottom:-6px;left:calc(50% - 6px);cursor:ns-resize}
#pbLabelBoxes [data-edge=se]{right:-6px;bottom:-6px;cursor:nwse-resize}
#pbLabelBoxes [data-edge=n]{top:-6px;left:calc(50% - 6px);cursor:ns-resize}
#pbLabelBoxes [data-edge=w]{left:-6px;top:calc(50% - 6px);cursor:ew-resize}
#pbLabelBoxes [data-edge=ne]{right:-6px;top:-6px;cursor:nesw-resize}
#pbLabelBoxes [data-edge=nw]{left:-6px;top:-6px;cursor:nwse-resize}
#pbLabelBoxes [data-edge=sw]{left:-6px;bottom:-6px;cursor:nesw-resize}
.pb-label-fields label{white-space:normal}
#pbLabelAdjustment>.toolbar>.field,#pbLabelAdjustment>.toolbar>label>.field{max-width:155px}

/* Isolation is scoped to the existing cloud Scan Studio. */
.pb-studio-isolation-ready .shell{transition:grid-template-columns .3s ease}
.pb-studio-isolation-ready .sidebar{min-width:0;transition:opacity .3s ease,padding .3s ease,visibility .3s ease}
.pb-studio-isolation-ready .main{transition:padding .3s ease}
.pb-studio-isolation-ready .main>.top{overflow:hidden;max-height:var(--pb-studio-header-height,none);transition:max-height .3s ease,opacity .3s ease,margin .3s ease,padding .3s ease}
#pbStudioIsolationControls{display:flex;justify-content:flex-end;gap:8px;align-items:center;flex-wrap:wrap;padding:0 0 10px}
#pbStudioIsolationControls .pb-isolated-title{display:none}
#pbStudioIsolationControls [hidden]{display:none!important}
.pb-studio-isolated #v12Shell{display:grid!important;grid-template-columns:0 minmax(0,1fr)!important;min-height:100dvh}
.pb-studio-isolated #v12Shell>.sidebar{padding:0!important;border:0!important;opacity:0;visibility:hidden;overflow:hidden}
.pb-studio-isolated #v12Shell>.main{padding:0!important}
.pb-studio-isolated .main>.top{max-height:0;min-height:0;padding:0!important;margin:0!important;opacity:0;visibility:hidden;border:0!important}
.pb-studio-isolated #pbStudioIsolationControls{min-height:60px;padding:10px 18px;margin:0;background:linear-gradient(100deg,#0b254b,#123d6c);color:#e6f6ff}
.pb-studio-isolated #pbStudioIsolationControls .pb-isolated-title{display:block;margin-right:auto;font-size:15px;font-weight:750}
.pb-studio-isolated #studio16Frame{display:block;height:calc(100dvh - var(--pb-isolation-controls-height,60px))!important;min-height:0!important;border-radius:0!important}
.pb-studio-isolated{overflow:hidden}
@media(prefers-reduced-motion:reduce){
 .pb-studio-isolation-ready .shell,.pb-studio-isolation-ready .sidebar,.pb-studio-isolation-ready .main,.pb-studio-isolation-ready .main>.top{transition:none}
}

#pbStudioIsolationControls [data-isolate]{display:inline-flex;align-items:center;gap:7px}
.pb-studio-isolated #pbStudioIsolationControls [data-isolation-status]{color:#e6f6ff}



/* Precision merchandise-label editor. CSS pixels here are editor-only zoom. */
.modal:has(#pbLabelAdjustment),.modal-card:has(#pbLabelAdjustment),.modal-content:has(#pbLabelAdjustment),#modalBox:has(#pbLabelAdjustment){width:min(1500px,96vw);max-width:96vw}
#pbLabelAdjustment,#pbLabelAdjustment *{box-sizing:border-box}
#pbLabelAdjustment{font-family:Inter,Segoe UI,Arial,sans-serif;color:#e9f5ff;background:#091629;padding:14px;border-radius:12px;max-height:80vh;overflow:auto}
#pbLabelAdjustment [hidden]{display:none!important}
#pbLabelAdjustment .pb-precision-layout{display:grid;grid-template-columns:220px minmax(280px,1fr)230px;gap:14px}
#pbLabelAdjustment .pb-precision-panel,#pbLabelAdjustment .pb-precision-work{background:linear-gradient(150deg,#11243d,#0c192b);border:1px solid #2a4664;border-radius:12px;padding:14px;min-width:0}
#pbLabelAdjustment h3{font-size:13px;color:#c1e9ff;margin:8px 0 14px}
#pbLabelAdjustment label{display:block;font-size:12px;color:#bdd2e5;margin:8px 0}
#pbLabelAdjustment .field{display:block;width:100%;min-width:0;background:#07182a;color:#f1f8ff;border:1px solid #3c6080;border-radius:8px;padding:8px;margin-top:5px}
#pbLabelAdjustment .caption{font-size:12px;color:#b0c8df;line-height:1.5}
#pbLabelAdjustment .pb-measure-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#pbLabelAdjustment .toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
#pbLabelAdjustment .toolbar label{display:flex;align-items:center;gap:6px}
#pbLabelAdjustment .toolbar .field{width:auto;margin:0}
#pbLabelAdjustment .pb-label-stage{display:block;overflow:auto;min-height:470px;max-height:60vh;padding:16px 24px 24px 12px;background:#69798b;border-radius:10px}
#pbLabelBoard{display:grid;grid-template-columns:66px max-content;grid-template-rows:32px max-content;width:max-content;margin-inline:auto;isolation:isolate}
#pbLabelBoard>#pbLabelCanvas{grid-area:2/2;z-index:0}
#pbLabelCanvas{position:relative;flex:none;background:#fff;box-shadow:0 12px 24px #06132170;touch-action:none}
#pbLabelArt{position:absolute;inset:auto;left:0;top:0;overflow:hidden;font-family:Arial,sans-serif;transform-origin:top left;pointer-events:none;line-height:normal}
#pbLabelGridlines{position:absolute;inset:0;pointer-events:none;background-image:linear-gradient(to right,#159bea40 1px,transparent 1px),linear-gradient(to bottom,#159bea40 1px,transparent 1px)}
/* The rulers share the canvas grid origin and scroll with it along their own axes. */
#pbLabelRulerX,#pbLabelRulerY,#pbLabelRulerCorner{position:sticky;background:#cce3f6;color:#214664;font:11px Arial,sans-serif}
#pbLabelRulerX{grid-area:1/2/3/3;align-self:start;height:32px;top:0;font-size:10px;z-index:2;box-shadow:inset 0 -1px #597e95}
#pbLabelRulerY{grid-area:2/1/3/3;justify-self:start;width:66px;left:0;z-index:2;box-shadow:inset -1px 0 #597e95}
#pbLabelRulerCorner{grid-area:1/1/3/3;place-self:start;width:66px;height:32px;top:0;left:0;z-index:3;display:grid;place-items:center;font-weight:bold;background:#b7d5ec}
#pbLabelRulerX .pb-ruler-tick{position:absolute;bottom:0;width:1px;height:5px;background:#597e95}
#pbLabelRulerY .pb-ruler-tick{position:absolute;right:0;height:1px;width:5px;background:#597e95}
#pbLabelRulerX .major{height:10px}#pbLabelRulerY .major{width:10px}
#pbLabelRulerX span{position:absolute;top:4px;transform:translateX(-50%);white-space:nowrap}
#pbLabelRulerY span{position:absolute;right:14px;transform:translateY(-50%);white-space:nowrap}
#pbLabelRulerX span.origin,#pbLabelRulerY span.origin{transform:none}
#pbLabelRulerX span.endpoint{transform:translateX(-100%)}
#pbLabelRulerY span.endpoint{transform:translateY(-100%)}
#pbLabelBoxes>[data-part].out-of-bounds{outline:2px dashed #e95d58}
#pbLabelAdjustment #pbLabelItems{display:grid;gap:5px;margin:12px 0}
#pbLabelAdjustment #pbLabelItems button{font-size:12px;text-align:left}
#pbLabelAdjustment #pbLabelItems .active{border-color:#20d2ff;background:#17446b;color:#e5faff}
#pbLabelAdjustment #pbLabelFeedback{color:#ffd28e;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
#pbLabelAdjustment .pb-precision-actions{margin-top:16px}
#pbLabelPreviewPanel{margin-top:14px;padding:18px;border:1px solid #345e81;border-radius:12px}
#pbLabelPreviewFrame{display:block;width:100%;height:380px;background:white;border:0;margin-bottom:12px}
@media(max-width:1100px){#pbLabelAdjustment .pb-precision-layout{grid-template-columns:200px minmax(260px,1fr)}#pbLabelAdjustment .pb-precision-panel:last-child{grid-column:1/-1}}
@media(max-width:680px){#pbLabelAdjustment .pb-precision-layout{display:flex;flex-direction:column}#pbLabelAdjustment .pb-label-stage{min-height:350px}}

#pbLabelAdjustment button{font:600 12px Inter,Segoe UI,Arial,sans-serif;line-height:1.4;padding:8px 11px;border:1px solid #3f6386;border-radius:8px;background:#142c4b;color:#f4faff;cursor:pointer}
#pbLabelAdjustment button.primary{background:linear-gradient(100deg,#0958e9,#00a6ef);border-color:#268df9}
#pbLabelAdjustment button:disabled{opacity:.5;cursor:not-allowed}
#pbLabelAdjustment button:hover:enabled{filter:brightness(1.15)}
/* Override the shared light secondary-button theme only inside this dark editor. */
#pbLabelAdjustment button.secondary,#pbLabelAdjustment button.neutral{background:#142c4b!important;color:#f4faff!important;border:1px solid #3f6386!important}
#pbLabelAdjustment #pbLabelItems button.active{background:#17446b!important;color:#e5faff!important;border-color:#20d2ff!important}

.modal:has(> #pbPrecisionDesigner){position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;padding:0;border:0;border-radius:0;overflow:hidden}
.modal-bg:has(#pbPrecisionDesigner){padding:0}
.modal:has(> #pbPrecisionDesigner)>button.close{display:none}

/* Register closing uses its own dark surface and a fixed action row. */
#modalHost .modal:has(> #pbRegisterClosing){
 width:min(100%,1020px);max-width:1020px;max-height:calc(100dvh - 34px);
 padding:0;overflow:hidden;background:#10233a;border:1px solid #35516f;
}
#modalHost .modal:has(> #pbRegisterClosing)>button.close{display:none}
#pbRegisterClosing{
 display:flex;flex-direction:column;max-height:calc(100dvh - 36px);
 color:#edf5ff;background:#10233a;font-size:14px;line-height:1.35;
}
#pbRegisterClosing .closing-heading,#pbRegisterClosing .closing-actions{
 flex:none;padding:12px 18px;background:#10233a;
}
#pbRegisterClosing .closing-heading{border-bottom:1px solid #35516f}
#pbRegisterClosing .closing-heading p{margin:0;color:#cbd5e1;overflow-wrap:anywhere}
#pbRegisterClosing h2,#pbRegisterClosing h3,#pbRegisterClosing b,#pbRegisterClosing .closing-audit summary{color:#fff!important}
#pbRegisterClosing label,#pbRegisterClosing th{color:#e2e8f0!important}
#pbRegisterClosing h2{font-size:21px;margin:0 0 4px}
#pbRegisterClosing h3{font-size:15px;margin:0 0 9px}
#pbRegisterClosing .closing-body{
 min-height:0;overflow:auto;overscroll-behavior:contain;
 display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);
 grid-template-areas:"summary reconciliation" "audit audit";
 align-content:start;align-items:start;gap:10px;padding:12px 18px;
}
#pbRegisterClosing .closing-summary,#pbRegisterClosing .closing-reconciliation,#pbRegisterClosing .closing-audit{
 min-width:0;border:1px solid #35516f;border-radius:10px;background:#132b45;padding:10px 12px;
}
#pbRegisterClosing .closing-summary{grid-area:summary}
#pbRegisterClosing .closing-reconciliation{grid-area:reconciliation}
#pbRegisterClosing .closing-audit{grid-area:audit;overflow-wrap:anywhere;color:#cbd5e1}
#pbRegisterClosing .closing-audit summary{cursor:pointer;font-weight:600}
#pbRegisterClosing .closing-audit p{margin:8px 0}
#pbRegisterClosing table{width:100%;border-collapse:collapse;background:transparent}
#pbRegisterClosing th,#pbRegisterClosing td{padding:4px 6px;border-bottom:1px solid #35516f;background:transparent}
#pbRegisterClosing th{text-align:left;font-size:13px;font-weight:500}
#pbRegisterClosing .closing-summary td{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;color:#fff}
#pbRegisterClosing .closing-expected{background:#1e4870}
#pbRegisterClosing .closing-expected th,#pbRegisterClosing .closing-expected td{font-weight:750;color:#e0f2ff!important}
#pbRegisterClosing label{display:block;margin:8px 0 4px;font-weight:600}
#modalHost #pbRegisterClosing .field{
 display:block;width:100%;box-sizing:border-box;margin:0;padding:7px 9px;
 background:#0d1e32!important;border:1px solid #6684a1!important;color:#f4f8ff!important;
 -webkit-text-fill-color:#f4f8ff;font-size:16px;font-variant-numeric:tabular-nums;
}
#pbRegisterClosing .field:disabled,#pbRegisterClosing .field[readonly]{opacity:1}
#modalHost #pbRegisterClosing .field:focus{border-color:#8bcfff!important}
#modalHost #pbRegisterClosing .field:user-invalid{border-color:#ffc2cb!important}
#pbRegisterClosing textarea{min-height:54px;resize:vertical}
#pbRegisterClosing #v10Variance{display:grid;gap:6px;margin:10px 0}
#pbRegisterClosing .closing-result{
 display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;align-items:baseline;
 padding:7px 9px;border-radius:7px;background:#183957;color:#b8e4ff;
}
#pbRegisterClosing .closing-result strong{text-align:right;font-variant-numeric:tabular-nums;color:#fff}
#pbRegisterClosing [data-closing-status]{grid-column:1/-1;color:#cbd5e1}
#pbRegisterClosing [data-tone="balanced"] .closing-result:first-child{background:#123f39;color:#9cf0cb}
#pbRegisterClosing [data-tone="over"] .closing-result:first-child{background:#47391f;color:#ffe2a4}
#pbRegisterClosing [data-tone="short"] .closing-result:first-child{background:#4a2639;color:#ffc2cb}
#pbRegisterClosing .closing-actions{
 display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;border-top:1px solid #35516f;
}
#pbRegisterClosing .closing-actions button{margin:0;min-height:40px}
@media(max-width:680px){
 #pbRegisterClosing .closing-body{grid-template-columns:minmax(0,1fr);grid-template-areas:"reconciliation" "summary" "audit";padding:10px}
 #pbRegisterClosing .closing-heading,#pbRegisterClosing .closing-actions{padding:10px}
 #pbRegisterClosing .closing-actions button:first-child{flex:1}
}
#pbRegisterClosing .closing-actions .primary{background:#145ba3!important;color:#fff!important}
#pbRegisterClosing .closing-actions button:disabled{opacity:1;background:#35516f!important;color:#e2e8f0!important}
#pbRegisterClosing label:has(+ #v10Reason:required)::after{content:" (required)";color:#ffe2a4}
