/* Shared finishing rules, with explicit colours for both themes. */
@media screen{
html body{--bo-surface:#102944;--bo-ink:#f1f6ff;--bo-secondary:#bed1e5;--bo-border:#6b9dcc;--bo-soft:#133252}
html[data-bo-theme=light] body{--bo-surface:#fff;--bo-ink:#152d45;--bo-secondary:#425d76;--bo-border:#7798b9;--bo-soft:#eef5fc}
html body :is(input,select,textarea):focus-visible{outline:3px solid #1875d1!important;outline-offset:2px}
html body :is(input,select,textarea):disabled{opacity:1;cursor:not-allowed;background:var(--bo-soft)!important;color:var(--bo-secondary)!important}
html body textarea{line-height:1.55;min-height:96px;resize:vertical}
html body input::placeholder,html body textarea::placeholder{color:var(--bo-secondary)!important;opacity:1}
html body dialog{max-height:calc(100dvh - 28px);max-width:calc(100vw - 24px);overflow:auto;overscroll-behavior:contain}
html body dialog .boWindowNav{position:sticky;top:0;z-index:10;padding:10px 0;margin:0 0 18px;background:var(--bo-surface);border-bottom:1px solid var(--bo-border)}
html body .boWindowClose{margin-left:auto;white-space:nowrap}
html body :is(.itForm,.itSplit,.itCardBody,.dialogBody,.itMain){min-width:0}
html body .itMailLayout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:18px;align-items:start}
html body .itMailSettings{grid-row:auto}
html body .itMailTools{display:grid;gap:18px;min-width:0}
html body .itMailTools>div{display:grid;gap:18px}
html body .itMailLayout>.full{grid-column:1/-1}
html body .itMailLayout .itForm{gap:16px}
html body .itMailLayout .itForm :is(input,select){min-height:44px}
html body .itMailLayout .itSplit{grid-template-columns:repeat(2,minmax(0,1fr))}
html body .itMailLayout h3{font-size:17px;color:var(--bo-ink)}
html body :is(.itHelp,.itMuted,.itSecretNote,.itForm small,.itForm label,.itSectionTitle,.itCardBody>p,.itConnectStatus small){color:var(--bo-secondary)!important}
html body .itSecretNote{background:var(--bo-soft)!important;border:1px solid var(--bo-border);border-radius:12px;padding:14px;overflow-wrap:anywhere}
html body .itDefinition{display:grid;grid-template-columns:minmax(100px,.6fr) minmax(0,1fr);gap:8px 14px;color:var(--bo-ink)}
html body .itDefinition dt{font-weight:700}
html body .itDefinition dd{margin:0;overflow-wrap:anywhere}
html body .itTestResult:empty{display:none}
html body .itTestResult{margin-top:16px;padding:14px;background:var(--bo-soft)!important;color:var(--bo-ink)!important;border:1px solid var(--bo-border);border-radius:12px;overflow-wrap:anywhere}
html body .itCheckResults{list-style:none;padding:0;margin:0}
html body .itCheckResults li{display:flex;align-items:start;gap:12px;padding:12px 0;border-bottom:1px solid var(--bo-border)}
html body .itCheckResults p{margin:5px 0;line-height:1.55}
html body .itCheckResults small{color:var(--bo-secondary)}
html body .itTestHub{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-bottom:18px}
html body .itSide{overflow-y:auto;overscroll-behavior:contain}
html body .itSideFooter{margin-top:18px}
html body .itStatusLine{grid-template-columns:12px minmax(100px,1fr) minmax(0,1.5fr)}
html body .itStatusLine small{overflow-wrap:anywhere;text-align:right}
html body :is(.itTable td,.itTable th){font-size:14px;line-height:1.5}
html body .itTabs button{padding:12px 15px}
html body .itSideNav .itSubNav button.active{background:#126bdd;color:#fff}
html body :is(.itDialog,.modalCard) .close{min-width:44px;min-height:44px}
html body :is(.itCardHead h2,.itCardBody,.dialogBody){overflow-wrap:anywhere}
html body .itButton{min-height:44px}
html body :is(#mailSaveResult,#backupRefreshStatus){color:var(--bo-ink);line-height:1.55}
html[data-bo-theme=light] body :is(.shopProductPrice,.itEmpty){color:#24435e!important}
html[data-bo-theme=light] body .termLine.INFO{color:#14603e!important}
html[data-bo-theme=light] body .termLine.SYSTEM{color:#165791!important}
html[data-bo-theme=light] body .termLine.WARNING{color:#795000!important}
html[data-bo-theme=light] body .termLine.ERROR{color:#9a2033!important}
html[data-bo-theme=light] body :is(.cpMeter,.cpTransferTip,.reportMedia){background:#edf4ff!important;color:#152d45!important;border-color:#7798b9!important}
html[data-bo-theme=light] body :is(.cpMeter,.cpTransferTip,.reportMedia) :is(b,span,strong,small){color:#152d45!important}
html[data-bo-theme=light] body .cpForecastNote{background:#fff3c4!important;color:#603e00!important;padding:10px;border-radius:8px}
html[data-bo-theme=light] body .cpAlert{background:#fff3c4!important;color:#603e00!important}
html[data-bo-theme=light] body .cpAlert.red{background:#fff0f2!important;color:#8f1730!important}
html[data-bo-theme=light] body .cpAlert :is(b,span){color:inherit!important}
html[data-bo-theme=light] body .q-map-empty{background:#edf4ff!important;color:#24435e!important}
}
@media screen and (max-width:1050px){html body .itMailLayout{grid-template-columns:minmax(0,1fr)}html body .itMailSettings{grid-row:auto}html body .itTestHub{grid-template-columns:minmax(0,1fr)}}
@media screen and (max-width:1250px){html body .itOnline{display:none}html body .itTitle{min-width:0}html body .itTitle h1{font-size:22px;overflow-wrap:anywhere}html body .itHeader{flex-wrap:wrap}html body .itTitle{flex:1}}
@media screen and (max-width:600px){html body .itMailLayout .itSplit{grid-template-columns:minmax(0,1fr)}html body .itDefinition{grid-template-columns:minmax(0,1fr)}html body .itDefinition dd{margin-bottom:8px}html body dialog .boWindowNav{gap:6px}html body dialog .boWindowNav button{padding:10px;flex:1}html body .itCheckResults li{flex-wrap:wrap}html body .itHeader{position:relative}html body .itTabs{position:relative;top:auto}}

@media screen{html body .orderDeliveryForm{display:grid;gap:12px}html body .orderDeliveryForm .formGrid{grid-template-columns:repeat(2,minmax(0,1fr))}html body .orderDeliveryForm input{width:100%;min-height:44px}html body .ordersQuickLink{display:block;padding:14px 18px;text-decoration:none;border-radius:12px;margin:0 0 16px;grid-column:1/-1}html body .orderDeliverySummary{margin-bottom:18px}html body .orderDeliverySummary a{display:inline-block;padding:12px 16px;border-radius:10px;text-decoration:none}html body .orderDeliverySummary p{line-height:1.6}}
@media screen and (max-width:800px){html body #content:has(.orderDeliveryForm)>.grid2{grid-template-columns:minmax(0,1fr)!important}html body .orderDeliveryForm .formGrid{grid-template-columns:minmax(0,1fr)}}
