/* Shared module content. Native handlers retain ownership of data and actions. */
.hw-workspace { display:grid; grid-template-columns:minmax(0,1fr); gap:22px; min-width:0; }
.hw-workspace > * { min-width:0; }
.hw-workspace > :not(.row) { margin-block:0!important; }
.hw-workspace > .row { margin-top:calc(-1 * var(--bs-gutter-y))!important; margin-bottom:0!important; }
.hw-portal-detail-workspace > .hw-portal-access:not(:first-child) { margin-top:22px; }
.hw-portal-detail-workspace > .hw-ssl-workspace { margin-bottom:22px; }
.hw-workspace > :last-child { margin-bottom:0; }
.hw-workspace-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); gap:22px; min-width:0; }
.hw-portal-shell :is(.hw-workspace-metric,.hw-workspace-panel) { min-width:0; border:1px solid var(--portal-border); border-radius:12px; background:var(--portal-surface); box-shadow:none; }
.hw-workspace-metric { display:flex; flex-direction:column; gap:12px; padding:22px; }
.hw-workspace-metric-label { margin:0; color:var(--fg-muted); font-size:13px; font-weight:500; line-height:1.5; }
.hw-workspace-metric-value { color:var(--fg-strong); font-size:clamp(21px,2.1vw,29px); font-weight:600; letter-spacing:-.025em; line-height:1.3; overflow-wrap:anywhere; }
.hw-workspace-metric-note { margin:0; color:var(--fg-muted); font-size:12px; line-height:1.55; overflow-wrap:anywhere; }
.hw-workspace-metric .progress { height:5px; background:var(--portal-canvas); }
.hw-workspace-metric .progress-bar { border-radius:5px; background:var(--fg-strong); }
.hw-workspace-grid { display:grid; grid-template-columns:minmax(0,3fr) minmax(0,2fr); gap:22px; align-items:stretch; }
.hw-workspace-panel-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px 18px; padding:20px 22px; border-bottom:1px solid var(--portal-border); }
.hw-portal-shell .hw-workspace-panel-header :is(h2,h3,h4,h5) { margin:0; font-size:16px; line-height:1.4; font-weight:600; color:var(--fg-strong); }
.hw-workspace-panel-header p { margin:0; color:var(--fg-muted); font-size:12px; }
.hw-portal-shell .hw-workspace-panel,
.hw-portal-shell .hw-workspace-panel .hw-workspace-panel-body { color:var(--fg); }
.hw-workspace-panel-body { padding:22px; }
.hw-workspace-panel-body > :last-child { margin-bottom:0; }
.hw-workspace-rows { display:grid; }
.hw-workspace-row { display:flex; align-items:center; gap:14px; padding:19px 22px; min-width:0; }
.hw-workspace-row + .hw-workspace-row { border-top:1px solid var(--portal-border); }
.hw-workspace-fact-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.hw-workspace-fact-grid .hw-workspace-row { align-items:flex-start; overflow-wrap:anywhere; }
.hw-workspace-fact-grid .hw-workspace-row + .hw-workspace-row { border-top:0; border-left:1px solid var(--portal-border); }
.hw-workspace-fact-grid p { margin:6px 0 0; }
.hw-workspace-fact-grid small { display:block; margin-top:8px; color:var(--fg-muted); }
.hw-workspace-row-icon { flex:0 0 34px; display:grid; place-items:center; width:34px; height:34px; border-radius:8px; background:var(--portal-canvas); color:var(--fg-strong); font-size:16px; }
.hw-workspace-row-copy { display:grid; gap:5px; min-width:0; flex:1; }
.hw-workspace-row-copy strong { color:var(--fg-strong); font-size:14px; line-height:1.5; font-weight:600; }
.hw-workspace-row-copy > span { color:var(--fg-muted); font-size:12px; line-height:1.55; }
.hw-workspace-row-action { display:inline-flex; align-items:center; justify-content:center; gap:7px; flex:0 0 auto; padding:7px 10px; border:1px solid var(--portal-border); border-radius:7px; font-size:12px; font-weight:500; line-height:1.5; color:var(--fg-strong); }
.hw-portal-shell .hw-workspace-link { text-decoration:none; color:inherit; }
.hw-portal-shell .hw-workspace-link:hover { text-decoration:none; background:var(--portal-canvas); }
.hw-workspace-link:first-child { border-radius:0; }
.hw-workspace-link:last-child { border-radius:0 0 11px 11px; }
.hw-workspace-link:focus-visible { outline:2px solid var(--fg-strong); outline-offset:-3px; }
.hw-workspace-facts { display:flex; flex-wrap:wrap; align-items:start; gap:16px 28px; padding:18px 22px; }
.hw-workspace-facts > * { min-width:0; overflow-wrap:anywhere; }
.hw-workspace-management { margin:24px 0; }
.hw-workspace-section-heading { margin-bottom:16px; }
.hw-portal-shell .hw-workspace-section-heading h2 { margin:0 0 5px; font-size:19px; font-weight:600; line-height:1.4; color:var(--fg-strong); }
.hw-workspace-section-heading p { margin:0; color:var(--fg-muted); font-size:13px; line-height:1.6; }
.hw-workspace-management-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; align-items:stretch; }
.hw-workspace-management-grid > .hw-workspace-panel { margin:0; }
.hw-workspace-management-grid > :only-child { grid-column:1/-1; }
.hw-workspace-metrics--domain { grid-template-columns:repeat(3,minmax(0,1fr)); }
.hw-workspace-metrics--domain > article { display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
.hw-workspace-metrics--domain > article > label { font-size:13px; font-weight:500; color:var(--fg-muted); }
.hw-workspace-metrics--domain > article > div { min-width:0; max-width:100%; overflow-wrap:anywhere; }
.hw-workspace-metrics--domain strong { font-size:17px; font-weight:600; color:var(--fg-strong); }
.hw-workspace-metrics--domain small { display:block; margin-top:8px; font-size:12px; }
.hw-workspace-metrics--domain form { margin-top:8px; }
.hw-portal-shell .hw-workspace-metrics--domain .btn-link { padding:0; justify-content:flex-start; text-align:left; white-space:normal; }
.hw-portal-shell .hw-workspace-metrics--domain .btn-link::after { position:static; inset:auto; transform:none; translate:none; }
.hw-workspace-domain-contacts { margin-top:22px; }
@media(max-width:1100px) {
 .hw-workspace-grid { grid-template-columns:1fr; }
 .hw-workspace-metrics--domain { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:700px) {
 .hw-workspace-fact-grid { grid-template-columns:1fr; }
 .hw-workspace-fact-grid .hw-workspace-row + .hw-workspace-row { border-left:0; border-top:1px solid var(--portal-border); }
 .hw-workspace,.hw-workspace-grid,.hw-workspace-management-grid { gap:16px; }
 .hw-workspace-management-grid,.hw-workspace-metrics--domain { grid-template-columns:1fr; }
 .hw-workspace-metrics { gap:16px; }
 .hw-workspace-metric,.hw-workspace-panel-body { padding:18px; }
 .hw-workspace-panel-header,.hw-workspace-row { padding:16px; }
 .hw-workspace-row { gap:10px; min-height:64px; }
 .hw-workspace-row-action { min-height:38px; padding:7px; }
 .hw-workspace-row-action > i { display:none; }
 .hw-workspace-row-icon { flex-basis:30px; width:30px; height:30px; font-size:14px; }
 .hw-workspace-facts { padding:16px; }
}

/* The services table keeps its native hooks inside the shared panel. */
.hw-portal-shell .hw-storage-workspace #services > .card-table { border:0; border-radius:0 0 11px 11px; margin-bottom:0 !important; }
.hw-portal-shell .hw-portal-detail .hw-storage-workspace #storage-access .hw-summary-wrapper { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.hw-portal-shell .hw-portal-detail .hw-storage-workspace #storage-access .hw-summary-wrapper > article { padding:0; border:0; }
.hw-storage-workspace #storage-access .hw-storage-password { margin-top:20px; }
@media(max-width:700px) {
 .hw-portal-shell .hw-portal-detail .hw-storage-workspace #storage-access .hw-summary-wrapper { grid-template-columns:1fr; }
}

/* Keep small helpers and technical values readable in both theme appearances. */
.hw-portal-shell .hw-workspace .form-text { color:var(--fg-muted); }
.hw-portal-shell .hw-workspace code { color:var(--fg-strong); }

/* Forms share spacing and checkbox alignment across the provider modules. */
.hw-workspace-form { display:grid; gap:18px; min-width:0; }
.hw-workspace-form > :is(.form-group,fieldset,.alert) { min-width:0; margin:0; }
.hw-workspace-form > .btn { justify-self:start; }
.hw-workspace-form fieldset { display:grid; gap:12px; }
.hw-portal-shell .hw-workspace-check { display:flex; align-items:flex-start; gap:10px; margin:0; font-weight:400; line-height:1.6; }
.hw-workspace-check > input { flex:0 0 auto; margin:.3em 0 0; width:16px; height:16px; }
.hw-workspace-check > span { min-width:0; overflow-wrap:anywhere; }
.hw-vps-keys .hw-workspace-row { justify-content:space-between; align-items:flex-start; flex-wrap:wrap; }
.hw-vps-keys .hw-workspace-row > * { min-width:0; max-width:100%; }
.hw-vps-keys code { overflow-wrap:anywhere; }
@media(max-width:700px) {
 .hw-vps-keys .hw-workspace-row { display:grid; gap:16px; }
 .hw-workspace-form > .btn { min-height:42px; }
}

/* The native schedule link arrow must not hang outside the new button. */
.hw-portal-shell #schedule-settings-button.btn::after { content:none; }


/* Product titles follow their role, independent of legacy Bootstrap heading classes. */
.hw-portal-detail--product {
 --product-section-title-size:1.1875rem;
 --product-card-title-size:1rem;
 --product-item-title-size:.875rem;
}
.hw-portal-shell .hw-portal-detail--product .hw-workspace-section-heading h2 {
 font-size:var(--product-section-title-size); font-weight:600; line-height:1.4;
}
.hw-portal-shell .hw-portal-detail--product .hw-workspace-panel-header > :is(h2,h3,h4,h5,h6),
.hw-portal-shell .hw-portal-detail--product .card:not(.hw-stats-card) > .card-header :is(h2,h3,h4,h5,h6),
.hw-portal-shell .hw-portal-detail--product .card:not(.hw-stats-card) > .card-body :is(h2,h3),
.hw-portal-shell .hw-portal-detail--product .hw-workspace-panel-body :is(h2,h3),
.hw-portal-shell .hw-portal-detail--product :is(#hw-product-faq-title,#hw-included-domains-title),
.hw-portal-shell .hw-portal-detail--product :is(.hw-portal-access,.hw-portal-product-information) > summary {
 font-size:var(--product-card-title-size); font-weight:600; line-height:1.4; color:var(--fg-strong);
}
.hw-portal-shell .hw-portal-detail--product .hw-workspace-panel-body :is(h4,h5,h6),
.hw-portal-shell .hw-portal-detail--product .card:not(.hw-stats-card) > .card-body :is(h4,h5,h6),
.hw-portal-shell .hw-portal-detail--product .hw-workspace-panel-body details > summary,
.hw-portal-shell .hw-portal-detail--product [aria-labelledby="hw-product-faq-title"] summary {
 font-size:var(--product-item-title-size); font-weight:600; line-height:1.5; color:var(--fg-strong);
}

.hw-portal-shell .hw-portal-detail--product [aria-labelledby="hw-product-faq-title"] .card-body { font-size:.875rem; line-height:1.65; }

/* Native module subpages use headings without a panel wrapper. */
.hw-portal-shell .hw-portal-detail--product .hw-portal-module-content > :is(h2,h3),
.hw-portal-shell .hw-portal-detail--product .hw-portal-module-content > .d-flex > :is(h2,h3) {
 font-size:var(--product-section-title-size); font-weight:600; line-height:1.4; color:var(--fg-strong);
}
.hw-portal-shell .hw-portal-detail--product .hw-portal-module-content > :is(h4,h5,h6) {
 font-size:var(--product-card-title-size); font-weight:600; line-height:1.4; color:var(--fg-strong);
}

/* A grid owns the spacing between peer cards, including legacy margin utilities. */
.hw-workspace-grid > :is(.hw-workspace-panel,.hw-workspace-metrics),
.hw-workspace-metrics > :is(.hw-workspace-metric,.hw-workspace-panel),
.hw-workspace-management-grid > .hw-workspace-panel { margin-block:0!important; min-width:0; }
.hw-workspace-grid > :only-child { grid-column:1/-1; }
.hw-workspace-grid--equal { grid-template-columns:repeat(2,minmax(0,1fr)); }

/* Native module metric cards use Bootstrap columns instead of workspace grids. */
.hw-portal-detail--product .hw-portal-module-content .row:has(> [class*="col-"] > .card:only-child) { --bs-gutter-x:22px; --bs-gutter-y:22px; }
.hw-portal-detail--product .hw-portal-module-content .row > [class*="col-"]:not([hidden]):has(> .card:only-child) { display:flex; flex-direction:column; min-width:0; margin-bottom:0!important; }
.hw-portal-detail--product .hw-portal-module-content .row > [class*="col-"] > .card:only-child { flex:1; margin-block:0!important; min-width:0; }

/* Match single-line controls and their form actions, without changing navigation or icon tools. */
.hw-portal-detail--product { --hw-product-control-height:40px; }
.hw-portal-shell .hw-portal-detail--product .hw-portal-module-content :is(input.form-control:not([type="hidden"],[type="checkbox"],[type="radio"],[type="file"],[type="range"],[type="color"]),select.form-control:not([multiple]):not([size]),select.form-select:not([multiple]):not([size])) {
 min-height:var(--hw-product-control-height); padding-block:7px; line-height:1.4;
}
.hw-portal-shell .hw-portal-detail--product .hw-portal-module-content form:has(:is(input.form-control,select.form-control,select.form-select)) :is(button[type="submit"],button:not([type]),input[type="submit"]).btn {
 min-height:var(--hw-product-control-height); padding-block:7px; line-height:1.4;
}
@media(max-width:1100px) {
 .hw-workspace-grid--equal { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:900px) {
 .hw-portal-detail--product { --hw-product-control-height:44px; }
}
@media(max-width:700px) {
 .hw-portal-detail--product .hw-portal-module-content .row:has(> [class*="col-"] > .card:only-child) { --bs-gutter-x:16px; --bs-gutter-y:16px; }
}

/* A labelled field, action and hint keep one alignment without spacer labels. */
.hw-workspace-control-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:12px; min-width:0; }
.hw-workspace-control-row > * { min-width:0; }
@media(max-width:700px) {
 .hw-workspace-control-row { grid-template-columns:minmax(0,1fr); }
 .hw-workspace-control-row > .btn { justify-self:start; width:auto!important; }
}

/* Keep help text on its own line so the action aligns with the control, not its explanation. */
.hw-workspace-labeled-action { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,3fr) auto; align-items:center; gap:8px 16px; }
.hw-workspace-labeled-action > * { min-width:0; }
.hw-workspace-field-label { grid-column:1; grid-row:1; }
.hw-workspace-field-label label { margin-bottom:0; }
.hw-workspace-field-control { grid-column:2; grid-row:1; display:flex; align-items:center; min-height:var(--hw-product-control-height); }
.hw-workspace-field-control > :is(input,select) { width:100%; }
.hw-workspace-field-action { grid-column:3; grid-row:1; }
.hw-workspace-field-help { grid-column:2/4; grid-row:2; }
.hw-portal-shell .hw-portal-detail--product .hw-workspace-field-action > .btn { min-height:var(--hw-product-control-height); }
.hw-portal-detail--product .hw-portal-module-content form.row { row-gap:12px; }
@media(max-width:700px) {
 .hw-workspace-labeled-action { grid-template-columns:minmax(0,1fr); gap:10px; }
 .hw-workspace-labeled-action > :is(.hw-workspace-field-label,.hw-workspace-field-control,.hw-workspace-field-help,.hw-workspace-field-action) { grid-column:1; grid-row:auto; }
}

/* Product section titles nested in native module wrappers retain the shared hierarchy. */
.hw-portal-shell .hw-portal-detail--product .hw-portal-module-content :is(#storage-access-heading,#storage-keys-heading),
.hw-portal-shell .hw-portal-detail--product .hw-portal-module-content :is(.hw-comet-history,.hw-comet-downloads) > .hw-comet-page-heading > h3 {
 font-size:var(--product-section-title-size); font-weight:600; line-height:1.4;
}
.hw-portal-shell .hw-portal-detail--product .hw-portal-module-content .hw-vps-snapshot-help > h4,
.hw-portal-shell .hw-portal-detail--product .hw-status__notice > h3 {
 font-size:var(--product-card-title-size); font-weight:600; line-height:1.4;
}
/* Status descriptions sit outside module-content but use the same product body text. */
.hw-portal-shell .hw-portal-detail--product .hw-status { font-size:14px; line-height:1.6; }
.hw-portal-shell .hw-portal-detail--product .hw-status :is(.hw-status__notice > p,.hw-status__description > p,.hw-status__summary,.hw-status__unavailable,.hw-status__refresh-note) { font-size:14px; line-height:1.6; }

/* Only the dashboard's shortcut/help pair shares a row height; its controls stay compact. */
.hw-portal-shell .hw-db--v2 .hw-db__context { align-items:stretch; }
.hw-portal-shell .hw-db--v2 .hw-db__context > .hw-db__hilfe { align-content:start; }
