/* Compact controls in the content area and the device assignment dialog. */
:is(.main, #moveDialog) {
  --module-control-height: 32px;
  --module-gap: 8px;
}

:is(.main, #moveDialog) :is(button, .btn, input[type="button"], input[type="submit"]) {
  box-sizing: border-box;
  min-height: var(--module-control-height);
  padding-block: 5px;
  line-height: 1.25;
}

:is(.main, #moveDialog) :is(select, input:not(.headerSearch input, [type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="hidden"])) {
  box-sizing: border-box;
  min-height: var(--module-control-height);
  padding-block: 5px;
}

:is(.main, #moveDialog) textarea {
  padding-block: 6px;
  resize: vertical;
}

.main :is(.content, .adminbox) {
  padding: clamp(10px, 1.1vw, 16px);
}

.main :is(.catalogFormGrid, .checkForm, .compactForm, .fieldGrid, .scriptExecGrid, .scheduleGrid) {
  gap: var(--module-gap);
}

.main :is(th, td) {
  padding-block: 6px;
}

.main .selectedDevice .deviceHead {
  padding-block: 7px;
  gap: 6px 10px;
}

.main .selectedDevice .deviceActions {
  flex-wrap: wrap;
  gap: 4px;
}

.main .selectedDevice .deviceActions .btn {
  min-height: 30px;
  padding: 4px 7px;
  white-space: nowrap;
}

.main .selectedDevice .tab {
  padding-block: 4px;
}

.main .selectedDevice .module {
  padding: 8px;
}

.main .selectedDevice .generalStack {
  gap: 6px;
}

.main .selectedDevice .generalSection {
  padding: 8px;
}

.main .selectedDevice .generalSection > h4 {
  margin: 0 0 5px;
}

.main .selectedDevice .inlineFacts {
  gap: 5px;
}

.main .selectedDevice .inlineFact {
  padding: 5px 7px;
}

.linuxSystemFacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0 12px;
  margin: 0;
}

.linuxSystemFacts > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 6px;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}

.linuxSystemFacts :is(dt, dd) {
  overflow-wrap: anywhere;
}

.linuxSystemFacts dt {
  color: var(--muted, inherit);
}

.linuxSystemFacts dd {
  margin: 0;
  font-weight: 600;
}

.linuxSystemDetails {
  margin-top: 6px;
}

#releaseNotes {
  box-sizing: border-box;
  width: min(560px, calc(100% - 24px));
  max-height: 80vh;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: inherit;
}

#releaseNotes h2 {
  margin: 0 0 8px;
}

#releaseNotes ul {
  padding-inline-start: 18px;
}

.patchScanSummary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 7px;
}

.main .patchHistorySection {
  overflow-x: auto;
}

.main .patchHistorySection .moduleHead {
  margin-bottom: 4px;
}

.main .patchHistorySection .moduleHead h4 {
  margin: 0;
}

/* 3.2.10: compact enrollment, scoped to avoid other modules */
#enrollmentPanel .compactForm{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px 10px}
#enrollmentPanel .compactForm>div{min-width:0}
#enrollmentPanel .enrollCommandBlock{grid-column:span 2}
#enrollmentPanel .enrollCommandHead{display:flex;align-items:center;justify-content:space-between;gap:6px}
#enrollmentPanel textarea.scriptSmall{height:60px!important;min-height:60px!important;width:100%;resize:vertical;margin:4px 0}
#enrollmentPanel .help{padding:5px 8px;margin:6px 0}
#enrollmentPanel .btn{min-height:28px;padding:4px 8px}
#enrollmentPanel .compactForm input,#enrollmentPanel .compactForm select{min-height:30px;max-width:100%}
#patchInstalledResult tr[hidden]{display:none!important}
@media(max-width:850px){#enrollmentPanel .compactForm{grid-template-columns:repeat(2,minmax(0,1fr))}}

.compactServices tr[hidden]{display:none!important}.compactServices td{padding:4px 6px}.compactServices summary.btn{display:inline-flex;min-height:24px;padding:3px 8px;cursor:pointer}.compactExplorerTools{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;margin:4px 0}.compactExplorerTools .tools{gap:4px}.compactExplorerTools output,.compactExplorerTools .results{flex-basis:100%}.compactExplorerTools output:empty,.compactExplorerTools .results:empty{display:none}.fileCompactSplit{display:grid;grid-template-columns:minmax(110px,18%) minmax(0,1fr);gap:8px}.fileCompactSplit .tree{min-height:0}.fileCompactSplit #fileResult{min-width:0;overflow:auto}.compactExplorerTools .btn,.fileCompactSplit .btn{min-height:26px;padding:3px 7px}

.main{--module-control-height:30px;--module-gap:6px}.main :is(th,td){padding-block:4px}.main .selectedDevice .module{padding:6px}.main .selectedDevice .generalSection{padding:6px}

/* Registry: compact lazy tree, independent scrolling, no large key buttons. */
.registrySplit{display:flex;align-items:stretch;gap:8px;min-width:0;margin:6px 0;min-height:320px}
.registryTree{flex:0 0 auto;width:32%;min-width:160px;max-width:60%;resize:horizontal;overflow:auto;max-height:65vh;border:1px solid var(--line);border-radius:4px;padding:4px}
.registryValues{flex:1;min-width:0;overflow:auto;max-height:65vh;border:1px solid var(--line);border-radius:4px;padding:6px}
.registryTreeRow{display:flex;align-items:center;min-height:24px;white-space:nowrap;gap:2px}
.registryTreeRow:hover,.registryTreeSelected{background:rgba(50,150,210,.16)}
.registryTree .registryTreeToggle,.registryTree .registryTreeLabel{display:inline-flex;align-items:center;justify-content:flex-start;background:none;color:inherit;border:0;border-radius:3px;box-shadow:none;padding:0 3px!important;min-height:22px!important;height:22px!important;line-height:20px!important;font-size:12px!important;font-weight:400;cursor:pointer;white-space:nowrap}
.registryTree .registryTreeToggle{flex:0 0 20px;justify-content:center}
.registryTree .registryTreeLabel{min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis}
.registryValueTable{width:100%;table-layout:fixed}.registryValueTable th:nth-child(1){width:34%}.registryValueTable th:nth-child(2){width:18%}.registryValueTable td{overflow-wrap:anywhere;white-space:normal;vertical-align:top;padding:4px 6px!important;font-size:12px}.registryValueTable tr.selectedRow{background:rgba(50,150,210,.18)}
@media(max-width:720px){.registrySplit{flex-direction:column}.registryTree{width:100%;max-width:100%;max-height:30vh;resize:vertical}.registryValues{max-height:55vh}}
#patchFilter{width:min(360px,100%);}
