/* Layout corrections for the existing authenticated panel. */
[hidden]{display:none!important}
.shell{display:grid;grid-template-columns:244px minmax(0,1fr);align-items:start}
.sidebar{position:sticky;inset:auto;top:0;width:auto;height:100dvh;overflow-y:auto;gap:16px}
.workspace{margin-left:0;min-width:0;width:100%}.content,.page,.panel,.heading>div,.topbar>div,.metrics article>div,.person>div,.order-row>div{min-width:0}
.topbar{min-height:76px;height:auto;padding-block:14px;gap:12px;flex-wrap:wrap}.top-actions{flex-wrap:wrap;min-width:0}
.content{width:100%}.heading{gap:20px;flex-wrap:wrap}.heading h1{overflow-wrap:anywhere}
.metrics{grid-template-columns:repeat(4,minmax(0,1fr))}.metrics article{min-width:0;flex-wrap:wrap}.metric-icon{flex-shrink:0}
.grid-main{grid-template-columns:minmax(0,1.65fr) minmax(260px,.85fr)}.panel-head{gap:14px;flex-wrap:wrap}
.order-row{grid-template-columns:42px minmax(0,1.4fr) minmax(0,1fr) minmax(80px,110px)}
.order-row strong,.tr strong,.person small,.template h3{overflow-wrap:anywhere}.order-row small,.tr small{font-size:13px}.status{font-size:11px;white-space:normal;overflow-wrap:anywhere}
.table-panel{overflow:visible}.table{min-width:0;width:100%}.tr{grid-template-columns:repeat(2,minmax(0,1.3fr)) repeat(3,minmax(0,1fr));gap:13px;font-size:15px}
.tr>span{min-width:0;overflow-wrap:anywhere}.tr[role=button]{cursor:pointer}.tr[role=button]:focus-visible{outline:3px solid var(--cyan);outline-offset:-3px}
.team-grid,.template-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}
.person{grid-template-columns:43px minmax(0,1fr)}.sidebar-foot{grid-template-columns:38px minmax(0,1fr) 30px}
label{font-size:14px}input,select,textarea,.btn,.btn.small{font-size:16px}input,select,textarea{min-width:0}textarea{resize:vertical}.btn{min-height:44px;white-space:normal}
.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid>label{min-width:0}
dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain}
dialog form{min-width:0}.dialog-head{gap:16px}.dialog-head>div{min-width:0}.dialog-head h2{overflow-wrap:anywhere}.dialog-head .dialog-close{flex:0 0 36px}
.dialog-actions{gap:16px;flex-wrap:wrap;align-items:stretch}.dialog-actions .dialog-close{width:auto;height:auto;font-size:16px;flex:0 1 auto;min-width:110px}
.dialog-actions>.btn{min-height:46px}.dialog-actions>.dialog-close{margin-right:auto}
.field-row{grid-template-columns:minmax(0,1fr) 130px 85px 36px}.field-row label{font-size:12px}.field-row input[type=checkbox]{width:18px;height:18px}
.field-error{color:#b62039;font-size:13px;font-weight:600;line-height:1.4}.form-error-summary{border:1px solid #c93045;background:#fff0f2;color:#8c1730;border-radius:10px;padding:13px;grid-column:1/-1}
input[aria-invalid=true],select[aria-invalid=true],textarea[aria-invalid=true]{border:2px solid #c93045;background:#fff6f7}.toast.error{background:#9e203b}
.toast{max-width:min(440px,calc(100vw - 30px));overflow-wrap:anywhere;z-index:1100}.sync[data-status=loading] i{background:#8f9ca8}.sync[data-status=error] i{background:#c93045}
.sidebar .external-link{display:block;color:#c6edff;text-decoration:none;border:1px solid #46728e;padding:12px 14px;border-radius:10px;font-size:15px}
.logo,.elgatec-partner-logo{background:transparent;border:0;box-shadow:none}.elgatec-partner-logo{border-radius:0!important}
.operation-notice{padding:14px;border-radius:10px;background:#e9f8fc;line-height:1.5}.operation-detail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.operation-detail dd{margin:5px 0;overflow-wrap:anywhere}.operation-detail dt{font-size:13px;color:var(--muted)}
.operation-description{white-space:pre-wrap;overflow-wrap:anywhere}.offers-list{display:grid;gap:16px}.offer-card{border:1px solid var(--line);border-radius:16px;background:white;padding:20px;min-width:0}.offer-card h3{margin-top:0}.offer-actions{display:flex;gap:16px;flex-wrap:wrap;margin-top:16px}.document-list{display:grid;gap:16px}.document-list article{padding:18px;border:1px solid var(--line);border-radius:14px;background:white;overflow-wrap:anywhere}
@media(max-width:1250px){.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-main{grid-template-columns:minmax(0,1fr)}.tr{font-size:14px;padding:15px 12px}.order-row{grid-template-columns:42px minmax(0,1.4fr) minmax(0,1fr) minmax(80px,110px)}}
@media(max-width:900px){.shell{grid-template-columns:minmax(0,1fr)}.sidebar{position:fixed;inset:0 auto 0 0;width:min(290px,86vw);height:100dvh;transform:translateX(-100%);transition:transform .2s}.sidebar.open{transform:translateX(0)}.topbar>#menu{display:block;margin-right:0}.workspace{margin-left:0}.content{padding:22px 18px 80px}.grid-main{display:grid}.grid-main>.panel+.panel{margin-top:0}}
@media(max-width:600px){.topbar{padding:12px 14px;gap:10px}.topbar>div:not(.top-actions){flex:1}.top-actions{width:100%;justify-content:flex-end}.topbar .sync{display:inline-block;margin-right:auto;font-size:12px}.topbar .icon-btn:not(#menu){display:block}.topbar .btn{font-size:15px;padding:10px 13px}.topbar .btn:before{content:none}.heading>.btn{display:inline-flex}.heading h1{font-size:27px}.heading>.btn{width:100%}.metrics{gap:12px}.metrics article{padding:16px;align-content:start}.metrics small{font-size:13px}.metrics em{font-size:12px}.content{padding:22px 14px 80px}.panel{padding:17px}.order-row{grid-template-columns:38px minmax(0,1fr)}.order-row>div:nth-child(3){display:block;grid-column:2}.order-row>.status{grid-column:2}.table-panel{border:0;background:transparent;padding:0;box-shadow:none}.tr.th{display:none}.tr{display:grid;grid-template-columns:minmax(0,1fr);margin-bottom:12px;padding:18px;border:1px solid var(--line);border-radius:13px;background:white;gap:12px}.tr span[data-label]:before{content:attr(data-label);display:block;font-size:12px;color:var(--muted);margin-bottom:5px}.tr .status{font-size:12px}.form-grid,.operation-detail{grid-template-columns:minmax(0,1fr)}.form-grid .wide{grid-column:auto}dialog form{padding:20px 16px}.dialog-actions>.btn{flex:1 1 180px}.dialog-actions>.dialog-close{flex:1 1 100%;margin-right:0}.field-row{grid-template-columns:minmax(0,1fr) 42px;border-bottom:1px solid var(--line);padding:12px 0}.field-row .field-label{grid-column:1}.field-row .field-type{grid-column:1}.field-row label{grid-column:1}.field-row button{grid-column:2;grid-row:1}.toast{right:15px;bottom:15px}.donut span{font-size:21px}.toolbar{flex-direction:column}.toolbar input,.toolbar select{max-width:none}}
@media(prefers-reduced-motion:reduce){.sidebar,.toast{transition:none}}

.operation-dialog-body{padding:24px;min-width:0}
.operation-error{border:1px solid #c93045;background:#fff0f2;color:#8c1730}
@media(max-width:600px){.operation-dialog-body{padding:20px 16px}}

/* Display contour traced from the official master. The original bitmap is unchanged. */
.elgatec-partner-logo{clip-path:polygon(27.4721% 3.9474%,24.1228% 4.1069%,22.3684% 4.3461%,20.4545% 4.7448%,18.3812% 5.3828%,16.7863% 6.0207%,15.5104% 6.6587%,13.4370% 7.9346%,12.1611% 8.8915%,10.8054% 10.0877%,9.5295% 11.4434%,9.5295% 11.5231%,9.0510% 12.0016%,9.0510% 12.0813%,8.2536% 13.0383%,7.7751% 13.7560%,7.6954% 13.9952%,7.3764% 14.3939%,7.2967% 14.6332%,7.1372% 14.7927%,6.2600% 16.4673%,6.2600% 16.6268%,5.9410% 17.1850%,5.9410% 17.3445%,5.6220% 17.9825%,5.6220% 18.1419%,5.2233% 19.1786%,5.2233% 19.4179%,5.0638% 19.7368%,5.0638% 19.9761%,4.9841% 20.0558%,4.9841% 20.2951%,4.8246% 20.6938%,4.6651% 21.8102%,4.5853% 21.8900%,4.5853% 22.2887%,4.5056% 22.3684%,4.5056% 22.7671%,4.4258% 22.8469%,4.4258% 23.4051%,4.3461% 23.4848%,4.3461% 24.2026%,4.2663% 24.2823%,4.2663% 25.3190%,4.1866% 25.3987%,4.1866% 74.0431%,4.2663% 74.1228%,4.3461% 76.2759%,4.4258% 76.3557%,4.4258% 76.9139%,4.5056% 76.9936%,4.5056% 77.4721%,4.5853% 77.5518%,4.5853% 78.0303%,4.6651% 78.1100%,4.8246% 79.2265%,4.9043% 79.3062%,5.0638% 80.1834%,5.2233% 80.5024%,5.2233% 80.7416%,5.3030% 80.8214%,5.5423% 81.6986%,5.7018% 81.9378%,5.7815% 82.3365%,5.9410% 82.5758%,5.9410% 82.7352%,6.8182% 84.5694%,6.9777% 84.7289%,7.2169% 85.2871%,7.3764% 85.4466%,7.4561% 85.6858%,7.6156% 85.8453%,8.0144% 86.5630%,8.2536% 86.8022%,8.6523% 87.4402%,9.2903% 88.1579%,9.2903% 88.2376%,11.0447% 90.0718%,12.8788% 91.5869%,14.7927% 92.8628%,16.9458% 93.9793%,18.3014% 94.5375%,20.3748% 95.1754%,22.6077% 95.6539%,25.6380% 95.9729%,28.2695% 96.0526%,72.1292% 96.0526%,74.7608% 95.9729%,76.4354% 95.8134%,78.8278% 95.4147%,81.2201% 94.7767%,83.6124% 93.8198%,85.1276% 93.0223%,87.1212% 91.7464%,88.8756% 90.3110%,90.1515% 89.0351%,90.1515% 88.9553%,91.0287% 87.9984%,91.6667% 87.0415%,91.9059% 86.8022%,92.3046% 86.0845%,92.4641% 85.9250%,92.5439% 85.6858%,92.7033% 85.5263%,93.0223% 84.8086%,93.1818% 84.6491%,93.5805% 83.8517%,93.5805% 83.6922%,93.8995% 83.1340%,93.8995% 82.9745%,94.0590% 82.7352%,94.2982% 81.9378%,94.5375% 81.4593%,94.5375% 81.2201%,94.7767% 80.6619%,94.7767% 80.4226%,94.9362% 80.1037%,95.0957% 79.2265%,95.1754% 79.1467%,95.1754% 78.7480%,95.2552% 78.6683%,95.2552% 78.3493%,95.3349% 78.2695%,95.3349% 77.9506%,95.4147% 77.8708%,95.4944% 76.9139%,95.5742% 76.8341%,95.6539% 75.3190%,95.7337% 75.2392%,95.7337% 73.9633%,95.8134% 73.8836%,95.8134% 25.1595%,95.7337% 25.0797%,95.6539% 23.2456%,95.5742% 23.1659%,95.5742% 22.6874%,95.4944% 22.6077%,95.4944% 22.1292%,95.4147% 22.0494%,95.3349% 21.2520%,95.2552% 21.1722%,95.2552% 20.7735%,95.1754% 20.6938%,94.9362% 19.4976%,94.7767% 19.1786%,94.7767% 18.9394%,94.3780% 17.9027%,94.3780% 17.7432%,94.1388% 17.3445%,93.9793% 16.7863%,93.7400% 16.3876%,93.7400% 16.2281%,92.8628% 14.5534%,91.6667% 12.7193%,90.7895% 11.6826%,90.7895% 11.6029%,88.9553% 9.6890%,88.3174% 9.1308%,87.5199% 8.4928%,85.7656% 7.2967%,83.2137% 5.9410%,82.0175% 5.4625%,79.7049% 4.7448%,77.7113% 4.3461%,75.8772% 4.1069%,72.2887% 3.9474%)}

/* ELGATEC private-panel UI: corporate controls and cards, auth rules preserved. */
#shell .sidebar nav button:not(.active):not(:disabled) { color: #c6edff; border: 1px solid transparent; background: transparent; }
#shell .sidebar nav button:not(.active):not(:disabled):hover { color: #e6fbff; border-color: #46728e; background: #123b50; }
#shell .sidebar nav button.active { color: #052c3c; border: 1px solid #65deeb; background: #27d8e8; box-shadow: inset 4px 0 #ffd447; }
#shell .btn.primary:not(:disabled),
#shell .btn.ghost:not(:disabled),
#shell .icon-btn:not(:disabled),
:is(#orderDialog, #orderDetailDialog, #inviteDialog, #templateDialog) .btn.ghost:not(:disabled) { color: #052c3c; border: 1px solid #65deeb; background: #27d8e8; }
#shell .btn.primary:not(:disabled):hover,
#shell .btn.ghost:not(:disabled):hover,
#shell .icon-btn:not(:disabled):hover,
:is(#orderDialog, #orderDetailDialog, #inviteDialog, #templateDialog) .btn.ghost:not(:disabled):hover { color: #052c3c; background: #72f3fb; }
#shell .text-btn { padding: 10px 12px; border: 1px solid #83dbe8; border-radius: 9px; color: #075064; background: #dff8fc; }
#shell .btn.primary[aria-pressed="true"], #shell .btn.ghost[aria-pressed="true"], #shell .icon-btn[aria-pressed="true"] { color: #052c3c; border-color: #ffd447; background: #27d8e8; box-shadow: inset 0 -3px #ffd447; }
#shell button:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
#shell button:focus-visible,
#shell a:focus-visible,
:is(#orderDialog, #orderDetailDialog, #inviteDialog, #templateDialog) button:focus-visible { outline: 3px solid #ffd447; outline-offset: 3px; }
#shell .metrics article { min-width: 0; min-height: 140px; border-top-width: 4px; align-content: start; }
#shell .metrics article:nth-child(1) { border-color: #27d8e8; background: linear-gradient(145deg, #d9fafe, #eefbfc); }
#shell .metrics article:nth-child(2) { border-color: #178bc9; color: #fff; background: linear-gradient(145deg, #163e56, #0d2a3b); }
#shell .metrics article:nth-child(3) { border-color: #ffd447; background: linear-gradient(145deg, #fff0a8, #fff8d8); }
#shell .metrics article:nth-child(4) { border-color: #72d6f4; background: linear-gradient(145deg, #d7edf8, #ecf6fc); }
#shell .metrics small { color: #315767; font-size: 14px; line-height: 1.4; }
#shell .metrics em { color: #456876; font-size: 13px; line-height: 1.4; }
#shell .metrics strong { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#shell .metrics article:nth-child(2) small,
#shell .metrics article:nth-child(2) em { color: #b9dce9; }
#shell .metrics article:nth-child(2) .metric-icon { color: #72f3fb; background: #24556b; }
#shell .metrics article:nth-child(3) .metric-icon { color: #765300; background: #fff8dc; }
#shell .metrics article:nth-child(4) .metric-icon { color: #126f94; background: #e6f7fc; }
#shell .panel,
#shell .template,
#shell .offer-card,
#shell .document-list article,
#shell .person { border-color: #b7d9e5; background: linear-gradient(145deg, #f7fdff, #eef7fb); }
#shell .template, #shell .offer-card { border-top: 4px solid #27d8e8; }
#shell .document-list article, #shell .person { border-left: 4px solid #27d8e8; }
#shell .panel-head p, #shell .template p { color: #456876; font-size: 14px; line-height: 1.5; }
#shell .sidebar-foot { flex: 0 0 auto; min-width: 0; grid-template-columns: 38px minmax(0, 1fr) 38px; }
#shell .sidebar-foot strong, #shell .sidebar-foot small { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
#shell .sidebar-foot #changePassword { grid-column: 1 / 3; grid-row: 2; min-width: 0; width: 100%; max-width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #65deeb; border-radius: 9px; color: #052c3c; background: #27d8e8; font-size: 14px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }
#shell .sidebar-foot #logout { grid-column: 3; grid-row: 1 / 3; min-height: 44px; align-self: stretch; border: 1px solid #46728e; border-radius: 9px; color: #c6edff; }
/* Native scrolling: only the authenticated shell and operational dialogs. */
html:has(#shell:not([hidden])),
#shell, #shell *,
:is(#orderDialog, #orderDetailDialog, #inviteDialog, #templateDialog) { scrollbar-color: #27d8e8 #dcecf2; }
#shell .sidebar { scrollbar-color: #27d8e8 #082a4c; }
html:has(#shell:not([hidden]))::-webkit-scrollbar,
#shell ::-webkit-scrollbar,
:is(#orderDialog, #orderDetailDialog, #inviteDialog, #templateDialog)::-webkit-scrollbar { width: 10px; height: 10px; }
html:has(#shell:not([hidden]))::-webkit-scrollbar-track,
#shell ::-webkit-scrollbar-track,
:is(#orderDialog, #orderDetailDialog, #inviteDialog, #templateDialog)::-webkit-scrollbar-track { background: #dcecf2; }
html:has(#shell:not([hidden]))::-webkit-scrollbar-thumb,
#shell ::-webkit-scrollbar-thumb,
:is(#orderDialog, #orderDetailDialog, #inviteDialog, #templateDialog)::-webkit-scrollbar-thumb { border: 2px solid #dcecf2; border-radius: 999px; background: #27d8e8; }
#shell .sidebar::-webkit-scrollbar-track { background: #082a4c; }
#shell .sidebar::-webkit-scrollbar-thumb { border-color: #082a4c; }
#shell input[type="range"],
:is(#orderDialog, #orderDetailDialog, #inviteDialog, #templateDialog) input[type="range"] { accent-color: #27d8e8; }
@media (max-width: 600px) {
  #shell .table-panel { border: 0; padding: 0; background: transparent; }
  #shell .tr:not(.th) { border-color: #b7d9e5; background: #f7fdff; }
}
@media (max-width: 380px) {
  #shell .metrics { grid-template-columns: minmax(0, 1fr); }
}

/* Partner UI follow-up: keep navigation and account controls reachable. */
#shell .sidebar > .logo, #shell .sidebar > .external-link { flex: 0 0 auto; }
#shell .sidebar > nav { flex: 1 1 auto; min-height: 88px; min-width: 0; overflow-y: auto; overscroll-behavior: contain; align-content: start; padding: 3px; margin: -3px; scrollbar-color: #27d8e8 #082a4c; }
#shell .sidebar nav button { min-width: 0; width: 100%; min-height: 44px; line-height: 1.3; overflow-wrap: anywhere; }
#shell .sidebar nav button i { flex: 0 0 22px; }
#shell .sidebar-foot > div { min-width: 0; }
#shell .sidebar-foot strong { color: #e6fbff; line-height: 1.3; }
#shell .sidebar-foot small { color: #b9dce9; font-size: 12px; line-height: 1.4; }
#shell .topbar .icon-btn { width: 44px; height: 44px; flex: 0 0 44px; }
#shell #page-coverage .coverage-heading h1 { color: #082a4c; }
#shell #page-coverage .coverage-heading .coverage-sync:not(.coverage-error) { color: #315767; }
@media (max-height: 760px) {
  #shell .sidebar { gap: 12px; padding-top: 16px; padding-bottom: 16px; }
  #shell .sidebar > .logo { padding-bottom: 8px; }
  #shell .sidebar > .logo .elgatec-partner-logo { width: 104px; }
}
@media (max-width: 900px) {
  #shell .sidebar { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
}
