/* Main panel cabinet. The model owns slot numbering; this sheet only renders it. */
.sp-subpage .ep-panel-mode .ep-panel-view{background:#edf1f4;padding:12px clamp(12px,2vw,28px) 20px;color:#162c41;scrollbar-color:#9baab8 #e8edf1}
.sp-subpage .ep-panel-view .ep-panel-heading{display:flex;align-items:center;gap:12px;max-width:1380px;margin:0 auto 10px;padding:0;border:0;min-height:44px}
.sp-subpage .ep-panel-view .ep-panel-heading-title{flex:none}
.sp-subpage .ep-panel-view .ep-panel-heading h3{margin:0;color:#172d43;font:650 17px/1.15 Inter,Arial,sans-serif;letter-spacing:-.02em}
.sp-subpage .ep-panel-view .ep-panel-tabs{display:flex;align-items:center;gap:3px;min-width:0;overflow-x:auto;margin:0 0 0 auto;padding:2px;scrollbar-width:thin;border:0}
.sp-subpage .ep-panel-view .ep-panel-tabs button,.sp-subpage .ep-panel-view .ep-panel-return{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:none;min-height:36px;margin:0;padding:6px 9px;border:1px solid transparent;border-radius:5px;background:transparent;color:#395168;font:600 12px/1.25 Inter,Arial,sans-serif;white-space:nowrap;cursor:pointer}
.sp-subpage .ep-panel-view .ep-panel-tabs button:hover,.sp-subpage .ep-panel-view .ep-panel-return:hover{background:#dde7ef;color:#173d76}
.sp-subpage .ep-panel-view .ep-panel-tabs button[aria-pressed="true"]{background:#dce9ff;border-color:#b7cfff;color:#164ebc}
.sp-subpage .ep-panel-view .ep-panel-tabs svg{width:16px;height:16px;flex:none}
.sp-subpage .ep-panel-view .ep-panel-tabs .ep-panel-add{background:#185bff;border-color:#185bff;color:#fff;padding-inline:11px}
.sp-subpage .ep-panel-view .ep-panel-tabs .ep-panel-add:hover{background:#114cd8;color:#fff}
.sp-subpage .ep-panel-view .ep-panel-return{border-color:#c7d3dd;background:#f8fafc}
.sp-subpage .ep-panel-view .ep-panel-return::before{content:'←';font-size:16px;line-height:0}
.sp-subpage .ep-panel-workspace{display:flex;align-items:flex-start;justify-content:center;gap:20px;max-width:1380px;min-height:0;margin:auto;padding:0}
.sp-subpage .ep-panel-workspace:has(.ep-panel-palette:not([hidden])){display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,370px)}
.sp-subpage .ep-panel-cabinet{min-width:0;width:min(100%,960px);margin:0;justify-self:center}
.sp-subpage .ep-panel-workspace:has(.ep-panel-palette:not([hidden])) .ep-panel-cabinet{width:100%}

.sp-subpage .ep-panel-view .ep-panel-diagram{position:relative;width:100%;max-width:none;min-height:720px;padding:24px 30px 19px;border:6px solid #e8ebe7;border-radius:29px;background:#2c3439;color:#e9ece9;box-shadow:0 0 0 1px #f8faf7,0 15px 30px #111f2d25,inset 0 0 0 1px #111a1e,inset 0 0 0 2px #69747a}
.sp-subpage .ep-panel-view .ep-cabinet-plate{position:relative;display:flex;align-items:flex-start;justify-content:center;min-height:67px;margin:0}
.sp-subpage .ep-panel-view .ep-cabinet-logo{display:block;width:174px;height:auto;max-height:38px;object-fit:contain}
.sp-subpage .ep-panel-view .ep-cabinet-settings{position:absolute;top:0;right:0;display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid #657079;border-radius:6px;background:#343e45;color:#eef2ef;cursor:pointer}
.sp-subpage .ep-panel-view .ep-cabinet-settings:hover,.sp-subpage .ep-panel-view .ep-cabinet-settings[aria-pressed="true"]{background:#46535c;border-color:#9daab1}
.sp-subpage .ep-panel-view .ep-cabinet-settings svg{width:18px;height:18px}
.sp-subpage .ep-panel-view .ep-main-breaker{display:grid;place-items:center;width:210px;height:64px;min-height:0;margin:23px auto 47px;padding:0;border:1px solid #5d686c;border-radius:5px;background:#080b0d;color:#f4f5f1;text-align:center;box-shadow:inset 0 2px 8px #000,0 1px 0 #586268;font-family:Inter,Arial,sans-serif}
.sp-subpage .ep-panel-view .ep-main-breaker-rating{font:700 27px/1 Inter,Arial,sans-serif;letter-spacing:-.02em;white-space:nowrap;font-variant-numeric:tabular-nums}
.sp-subpage .ep-panel-view .ep-breaker-bay{position:relative;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.sp-subpage .ep-panel-view .ep-breaker-grid{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 14px;max-height:none;overflow:visible;background:none}
.sp-subpage .ep-panel-view .ep-breaker-slot{position:relative;display:grid;grid-template-columns:24px 116px minmax(0,1fr) 15px;align-items:center;gap:5px;min-width:0;min-height:42px;margin:0;padding:2px 7px;border:1px solid #101b21;border-radius:2px;background:#263038;color:#f4f5f3;text-align:left;cursor:grab;touch-action:none;box-shadow:inset 0 1px #4b565d,inset 0 -1px #141d23,0 1px 2px #0d171d66;font-family:Inter,Arial,sans-serif}
.sp-subpage .ep-panel-view .ep-breaker-slot:hover{border-color:#a5b9c7;background:#303d46}
.sp-subpage .ep-panel-view .ep-breaker-slot:active{cursor:grabbing}
.sp-subpage .ep-panel-view .ep-breaker-slot.is-selected{outline:3px solid #4d8bff;outline-offset:1px;z-index:2}
.sp-subpage .ep-panel-view .ep-breaker-slot.is-double{border-bottom-color:#101b21}
.sp-subpage .ep-panel-view .ep-breaker-slot.is-double.is-continuation{border-top-color:#3c4850}
.sp-subpage .ep-panel-view .ep-breaker-slot.is-spare{border-color:#1c272d;background:#303940;color:#bac3c4;cursor:default;box-shadow:inset 0 1px #4c575e,inset 0 -1px #222b31}
.sp-subpage .ep-panel-view .ep-slot-number{color:#e3e8e6;font:700 12px/1 Inter,Arial,sans-serif;font-variant-numeric:tabular-nums;text-align:center}
.sp-subpage .ep-panel-view .ep-breaker-hardware{position:relative;display:flex;align-items:center;justify-content:space-between;gap:5px;height:34px;padding:3px 8px;border:1px solid #111b20;border-radius:2px;background:linear-gradient(#344047,#232d34);box-shadow:inset 0 1px #607079,inset 0 -2px #182126}
.sp-subpage .ep-panel-view .ep-breaker-ridge{position:absolute;inset:3px auto 3px 3px;width:3px;background:repeating-linear-gradient(0deg,#5c6c75 0 2px,#26373f 2px 4px)}
.sp-subpage .ep-panel-view .ep-breaker-rating{margin-left:6px;color:#f2f3ed;font:700 13px/1 Inter,Arial,sans-serif;white-space:nowrap;font-variant-numeric:tabular-nums}
.sp-subpage .ep-panel-view .ep-breaker-switch{position:relative;flex:none;width:38px;height:22px;border:1px solid #091317;border-radius:2px;background:linear-gradient(#0b1318 0%,#37454d 46%,#131e25 50%,#091216 100%);box-shadow:0 2px 3px #091318,inset 0 1px #708089}
.sp-subpage .ep-panel-view .ep-breaker-slot.is-continuation .ep-breaker-switch::before{content:'';position:absolute;width:4px;height:13px;right:calc(50% - 2px);top:-14px;background:#10191e;box-shadow:1px 0 #65747c}
.sp-subpage .ep-panel-view .ep-breaker-blank{width:38px;height:18px;border:1px solid #3d4a51;background:#707c80;box-shadow:inset 0 1px #9ba7a9}
.sp-subpage .ep-panel-view .ep-breaker-label{display:flex;flex-direction:column;justify-content:center;min-width:0;height:34px;padding:3px 7px;background:#f2efe5;color:#1f2b30;border:1px solid #c9c9bf;border-radius:1px;box-shadow:0 1px 1px #10181e6b;overflow:hidden}
.sp-subpage .ep-panel-view .ep-breaker-label strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:700 12px/1.2 Inter,Arial,sans-serif;color:#1b272d}
.sp-subpage .ep-panel-view .ep-breaker-label small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:500 12px/1.2 Inter,Arial,sans-serif;color:#3d4d53}
.sp-subpage .ep-panel-view .ep-breaker-leg{color:#b5c2c4;font:700 11px/1 Inter,Arial,sans-serif;text-align:center}
.sp-subpage .ep-panel-view .is-spare .ep-breaker-label{background:#aab2b2;border-color:#8e9a9c;box-shadow:none}
.sp-subpage .ep-panel-view .is-spare .ep-breaker-label strong{color:#344247;font-weight:600}
.sp-subpage .ep-panel-view .is-spare .ep-breaker-label small{color:#536268}
.sp-subpage .ep-panel-view .ep-breaker-slot.is-being-dragged{opacity:.48}
.sp-subpage .ep-panel-view .ep-breaker-slot.is-drop-before::before,.sp-subpage .ep-panel-view .ep-breaker-slot.is-drop-after::after{content:'';position:absolute;left:-3px;right:-3px;height:4px;background:#79a5ff;border-radius:3px;z-index:5;box-shadow:0 1px 3px #0b327d55}
.sp-subpage .ep-panel-view .ep-breaker-slot.is-drop-before::before{top:-5px}
.sp-subpage .ep-panel-view .ep-breaker-slot.is-drop-after::after{bottom:-5px}
.ep-breaker-ghost{position:fixed!important;z-index:9999;width:min(360px,45vw)!important;min-height:42px!important;pointer-events:none!important;opacity:.94;box-shadow:0 12px 20px #0d253c55!important;transform:rotate(1deg)}
.sp-subpage .ep-panel-view .ep-bay-empty{position:relative;margin:0;padding:24px;text-align:center;color:#e5e9e8}
.sp-subpage .ep-panel-view .ep-cabinet-foot{display:flex;justify-content:space-between;gap:12px;margin:14px 2px 0;color:#bfc9c8;font:600 11px/1.3 Inter,Arial,sans-serif;font-variant-numeric:tabular-nums}
.sp-subpage .ep-panel-palette{position:sticky;top:8px;min-width:0;max-height:min(750px,calc(100dvh - 140px));overflow:auto;padding:0 17px 20px;border:1px solid #cad4dc;border-radius:7px;background:#fff;box-shadow:0 10px 25px #1a34431c;scrollbar-color:#b2c1cb #f1f4f5}
.sp-subpage .ep-panel-backdrop[hidden],.sp-subpage .ep-panel-palette[hidden],.sp-subpage .ep-panel-palette-page[hidden]{display:none!important}
.sp-subpage .ep-panel-backdrop{position:fixed;inset:0;z-index:34;background:#10274366}
.sp-subpage .ep-panel-palette-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 -17px 14px;padding:13px 17px;border-bottom:1px solid #d9e1e8;background:#fff}
.sp-subpage .ep-panel-palette-head h4{margin:0;font:700 15px/1.3 Inter,Arial,sans-serif;color:#18354d}
.sp-subpage .ep-panel-palette-head [data-action="done"]{min-height:34px;padding:6px 10px}
.sp-subpage .ep-panel-palette-page{max-width:none;margin:0;padding:0}
.sp-subpage .ep-panel-palette-page .ep-panel-input-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.sp-subpage .ep-panel-palette-page .ep-note-field{grid-column:1/-1}
.sp-subpage .ep-panel-palette-page .ep-note-field textarea{width:100%;min-width:0;min-height:72px;resize:vertical;padding:8px 10px;border:1px solid #cdd6e3;border-radius:5px;background:#fff;color:#22354e;font:400 13px/1.45 Inter,Arial,sans-serif;caret-color:#185bff}
.sp-subpage .ep-panel-palette-page .ep-panel-input-grid :is(input,select){min-height:38px}
.sp-subpage .ep-panel-palette-page .ep-panel-actions{margin:8px 0 13px}
.sp-subpage .ep-panel-palette-page .ep-panel-actions .ep-inline-button{min-height:34px;padding:6px 9px;font-size:11px}
.sp-subpage .ep-panel-palette-page .ep-pedit-circuit-layout{display:block}
.sp-subpage .ep-panel-palette-page .ep-pedit-circuit-list{max-height:none;overflow:visible}
.sp-subpage .ep-panel-palette-page .ep-pedit-circuit-editor{padding:0;border:0}
.sp-subpage .ep-panel-palette-page .ep-pedit-circuit-tools{display:grid;grid-template-columns:1fr;gap:8px}
.sp-subpage .ep-panel-palette-page .ep-pedit-circuit-tools>label:first-child{grid-column:auto}
.sp-subpage .ep-panel-palette-page .ep-pedit-device{grid-template-columns:1fr 1fr}
.sp-subpage .ep-panel-palette-page .ep-pedit-device>button,.sp-subpage .ep-panel-palette-page .ep-pedit-device>.ep-panel-confirm{grid-column:1/-1}
.sp-subpage .ep-panel-palette-page .ep-pedit-table-wrap{margin:8px 0 16px;max-width:100%;overflow:auto}
.sp-subpage .ep-panel-palette-page .ep-pedit-table-wrap table{font-size:11px}
.sp-subpage .ep-panel-recommendation-note{padding:10px 12px;border:1px solid #cedbea;border-radius:5px;background:#f2f6fc;color:#35516a;font-size:12px;line-height:1.5}
.sp-subpage .ep-panel-view :is(button,input,select,textarea,summary,a):focus-visible{outline:3px solid #185bff;outline-offset:2px}

@media(max-width:1100px){
  .sp-subpage .ep-panel-view .ep-panel-tabs button[data-section] span{display:none}
  .sp-subpage .ep-panel-view .ep-breaker-slot{grid-template-columns:21px 88px minmax(0,1fr) 13px;gap:4px;padding:2px 4px}
  .sp-subpage .ep-panel-view .ep-breaker-hardware{padding:3px 5px}
  .sp-subpage .ep-panel-view .ep-breaker-switch{width:29px}
}
@media(max-width:850px){
  .sp-subpage .ep-panel-workspace:has(.ep-panel-palette:not([hidden])){grid-template-columns:minmax(0,1fr) minmax(290px,320px);gap:12px}
  .sp-subpage .ep-panel-view .ep-breaker-slot{grid-template-columns:19px 65px minmax(0,1fr);gap:3px}
  .sp-subpage .ep-panel-view .ep-breaker-leg{display:none}
  .sp-subpage .ep-panel-view .ep-breaker-rating{font-size:12px}
  .sp-subpage .ep-panel-view .ep-breaker-switch{width:22px}
}
@media(max-width:760px){
  .sp-subpage .ep-panel-mode .ep-panel-view{padding:9px 10px 20px}
  .sp-subpage .ep-panel-view .ep-panel-heading{gap:6px;min-height:39px}
  .sp-subpage .ep-panel-view .ep-panel-heading h3{font-size:14px}
  .sp-subpage .ep-panel-view .ep-panel-tabs{gap:1px}
  .sp-subpage .ep-panel-view .ep-panel-tabs button,.sp-subpage .ep-panel-view .ep-panel-return{min-height:36px;padding:6px}
  .sp-subpage .ep-panel-view .ep-panel-tabs .ep-panel-add{padding:6px 8px}
  .sp-subpage .ep-panel-view .ep-panel-tabs [data-action="csv"] span{display:none}
  .sp-subpage .ep-panel-view .ep-panel-return{font-size:0}
  .sp-subpage .ep-panel-view .ep-panel-return::before{font-size:17px}
  .sp-subpage .ep-panel-workspace:has(.ep-panel-palette:not([hidden])){display:flex;justify-content:center}
  .sp-subpage .ep-panel-palette{position:fixed;z-index:35;left:7px;right:7px;bottom:7px;top:auto;width:auto;max-height:min(72dvh,650px);border-radius:9px;box-shadow:0 16px 35px #10274330}
  .sp-subpage .ep-panel-view .ep-panel-diagram{min-height:0;padding:14px 12px 15px;border-width:4px;border-radius:21px}
  .sp-subpage .ep-panel-view .ep-cabinet-plate{min-height:50px}
  .sp-subpage .ep-panel-view .ep-cabinet-logo{width:130px}
  .sp-subpage .ep-panel-view .ep-cabinet-settings{width:32px;height:32px}
  .sp-subpage .ep-panel-view .ep-main-breaker{width:150px;height:50px;margin:13px auto 25px}
  .sp-subpage .ep-panel-view .ep-main-breaker-rating{font-size:21px}
  .sp-subpage .ep-panel-view .ep-breaker-grid{gap:3px 10px}
}
@media(max-width:520px){
  .sp-subpage .ep-panel-view .ep-panel-heading{flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:2px 6px}
  .sp-subpage .ep-panel-view .ep-panel-heading-title{display:block;order:0;flex:0 0 auto}
  .sp-subpage .ep-panel-view .ep-panel-heading h3{font-size:13px}
  .sp-subpage .ep-panel-view .ep-panel-return{order:1;margin-left:auto}
  .sp-subpage .ep-panel-view .ep-panel-tabs{order:2;flex:1 0 100%;justify-content:space-between;overflow:visible;margin-left:0}
  .sp-subpage .ep-panel-view .ep-panel-tabs button[data-section] span{display:none}
  .sp-subpage .ep-panel-view .ep-panel-tabs .ep-panel-add{font-size:11px}
  .sp-subpage .ep-panel-view .ep-panel-diagram{padding:11px 9px 13px;border-radius:17px}
  .sp-subpage .ep-panel-view .ep-cabinet-plate{min-height:42px}
  .sp-subpage .ep-panel-view .ep-cabinet-logo{width:110px}
  .sp-subpage .ep-panel-view .ep-cabinet-settings{width:28px;height:28px}
  .sp-subpage .ep-panel-view .ep-cabinet-settings svg{width:16px;height:16px}
  .sp-subpage .ep-panel-view .ep-main-breaker{width:120px;height:42px;margin:7px auto 19px}
  .sp-subpage .ep-panel-view .ep-main-breaker-rating{font-size:18px}
  .sp-subpage .ep-panel-view .ep-breaker-grid{gap:2px 7px;max-height:none;overflow:visible}
  .sp-subpage .ep-panel-view .ep-breaker-slot{grid-template-columns:14px 43px minmax(0,1fr);gap:2px;min-height:69px;align-items:stretch;padding:2px}
  .sp-subpage .ep-panel-view .ep-slot-number{align-self:center;font-size:11px}
  .sp-subpage .ep-panel-view .ep-breaker-hardware{flex-direction:column;justify-content:center;gap:1px;height:auto;min-height:58px;align-self:stretch;padding:2px}
  .sp-subpage .ep-panel-view .ep-breaker-ridge{display:none}
  .sp-subpage .ep-panel-view .ep-breaker-rating{margin-left:0;font-size:12px}
  .sp-subpage .ep-panel-view .ep-breaker-switch{width:22px;height:10px}
  .sp-subpage .ep-panel-view .ep-breaker-blank{width:22px;height:9px}
  .sp-subpage .ep-panel-view .ep-breaker-label{height:auto;min-height:58px;padding:5px 4px;overflow:visible}
  .sp-subpage .ep-panel-view .ep-breaker-label strong{display:block;overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere;line-height:1.2}
  .sp-subpage .ep-panel-view .ep-breaker-label small{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;white-space:normal;overflow-wrap:anywhere;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.2}
  .sp-subpage .ep-panel-view .ep-cabinet-foot{font-size:11px}
  .sp-subpage .ep-panel-palette-page .ep-panel-input-grid{grid-template-columns:1fr}
}
@media(max-width:350px){
  .sp-subpage .ep-panel-view .ep-panel-tabs button{padding-inline:4px}
  .sp-subpage .ep-panel-view .ep-panel-tabs .ep-panel-add{padding-inline:5px}
  .sp-subpage .ep-panel-view .ep-breaker-slot{grid-template-columns:15px minmax(0,1fr);grid-template-rows:29px auto;gap:2px 4px;min-height:0;align-items:center;padding:3px}
  .sp-subpage .ep-panel-view .ep-slot-number{grid-column:1;grid-row:1}
  .sp-subpage .ep-panel-view .ep-breaker-hardware{grid-column:2;grid-row:1;flex-direction:row;justify-content:space-between;align-self:center;width:min(100%,82px);height:27px;min-height:27px;padding:2px 5px}
  .sp-subpage .ep-panel-view .ep-breaker-switch{width:23px;height:17px}
  .sp-subpage .ep-panel-view .ep-breaker-blank{width:23px;height:15px}
  .sp-subpage .ep-panel-view .ep-breaker-label{grid-column:1/-1;grid-row:2;min-height:0;padding:4px 5px;overflow:visible}
  .sp-subpage .ep-panel-view .ep-breaker-label strong,.sp-subpage .ep-panel-view .ep-breaker-label small{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:break-word;word-break:normal}
  .sp-subpage .ep-panel-view .ep-breaker-label small{display:block;-webkit-line-clamp:unset}
}
@media(prefers-reduced-motion:reduce){.sp-subpage .ep-panel-view *{transition:none!important;animation:none!important}}
@media print{.sp-subpage .ep-panel-view .ep-panel-heading,.sp-subpage .ep-panel-palette{display:none!important}.sp-subpage .ep-panel-view .ep-panel-diagram{box-shadow:none;break-inside:avoid}.sp-subpage .ep-panel-view .ep-breaker-slot{break-inside:avoid}}
/* Keep the cabinet title available to focus without repeating the rail label. */
.sp-subpage .ep-panel-view .ep-panel-accessible-title{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.sp-subpage .ep-panel-view .ep-panel-heading-title:has(select[hidden]){flex:0;width:0}
.sp-subpage .ep-panel-view .ep-panel-heading-title select{display:block;max-width:210px;min-height:36px;padding:6px 28px 6px 9px;border:1px solid #c7d3dd;border-radius:5px;background:#f8fafc;color:#17364e;font:600 12px/1.25 Inter,Arial,sans-serif;text-overflow:ellipsis}
.sp-subpage .ep-panel-view .ep-panel-heading-title select[hidden]{display:none}
.sp-subpage .ep-panel-view .ep-panel-tabs .ep-panel-subpanel-add{border-color:#c7d3dd;background:#f8fafc}
.sp-subpage .ep-panel-view .ep-breaker-slot[data-select-panel]{cursor:pointer;touch-action:auto}
@media(max-width:520px){
  .sp-subpage .ep-panel-view .ep-panel-tabs{overflow-x:auto;justify-content:flex-start;max-width:100%;gap:2px}
  .sp-subpage .ep-panel-view .ep-panel-heading-title select{max-width:min(240px,70vw)}
  .sp-subpage .ep-panel-view .ep-panel-tabs .ep-panel-subpanel-add{font-size:11px}
}
