body.nas-details-open { overflow: hidden; }
#nas-details {
  color-scheme: dark;
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #475569;
  border-radius: 16px;
  box-shadow: 0 24px 80px #0008;
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 24px;
  overflow: auto;
  font: inherit;
}
#nas-details::backdrop { background: #020617c9; backdrop-filter: blur(4px); }
#nas-details h2 { font-size: 1.35rem; font-weight: 700; margin: 0; }
#nas-details h3 { font-size: 1rem; font-weight: 700; margin: 0; }
#nas-details p { margin: 10px 0; }
#nas-details .nas-details-header, #nas-details .nas-card-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
#nas-details .nas-details-controls { display: flex; gap: 8px; }
#nas-details button {
  border: 1px solid #64748b; border-radius: 8px; background: #1e293b;
  color: #f1f5f9; padding: 8px 14px; font-size: .875rem; cursor: pointer;
}
#nas-details button:hover { background: #334155; }
#nas-details button:disabled { opacity: .5; cursor: wait; }
#nas-details :focus-visible { outline: 2px solid #7dd3fc; outline-offset: 3px; }
#nas-details .nas-muted { color: #a8b8cc; font-size: .8rem; overflow-wrap: anywhere; }
#nas-details .nas-details-summary { font-size: 1rem; margin-top: 20px; }
#nas-details .nas-notice { color: #fbbf24; font-size: .875rem; }
#nas-details .nas-notice:empty { display: none; }
#nas-details .nas-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
#nas-details .nas-card { background: #1e293b; border: 1px solid #334155; border-radius: 10px; padding: 16px; min-width: 0; }
#nas-details .nas-badge { border: 1px solid; border-radius: 999px; padding: 3px 9px; font-size: .75rem; flex-shrink: 0; }
#nas-details .nas-good { color: #86efac; border-color: #166534; background: #052e16; }
#nas-details .nas-attention { color: #fda4af; border-color: #9f1239; background: #4c0519; }
#nas-details .nas-neutral { color: #cbd5e1; border-color: #64748b; background: #334155; }
#nas-details .nas-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
#nas-details dt { color: #a8b8cc; font-size: .75rem; }
#nas-details dd { margin: 3px 0 0; font-size: .875rem; overflow-wrap: anywhere; }
#nas-details .nas-reason { font-size: .8rem; line-height: 1.5; overflow-wrap: anywhere; }
#nas-details summary { cursor: pointer; font-size: .875rem; }
#nas-details .nas-disk-details { border-top: 1px solid #475569; padding-top: 12px; margin-top: 14px; }
#nas-details .nas-messages { font-size: .8rem; list-style: disc; padding-left: 18px; overflow-wrap: anywhere; }
#nas-details .nas-table-scroll { overflow-x: auto; }
#nas-details .nas-table-hint { display: none; }
#nas-details table { border-collapse: collapse; width: 100%; font-size: .75rem; }
#nas-details caption { text-align: left; color: #a8b8cc; padding: 6px 0; }
#nas-details th, #nas-details td { padding: 6px 8px; text-align: left; border-bottom: 1px solid #475569; }
#nas-details .nas-unit { align-self: start; }
#nas-details .nas-unit > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#nas-details .nas-unit-name { min-width: 0; }
#nas-details .nas-unit-name strong { overflow-wrap: anywhere; font-weight: 600; }
#nas-details .nas-unit-name strong::before { content: "▸ "; color: #94a3b8; }
#nas-details .nas-unit[open] .nas-unit-name strong::before { content: "▾ "; }
#nas-details .nas-unit-name > span { display: block; margin-top: 4px; }
#nas-details .nas-footer { border-top: 1px solid #334155; padding-top: 16px; margin-top: 22px; }
#nas-details .nas-section { border-top: 1px solid #475569; padding-top: 14px; margin-top: 20px; }
#nas-details .nas-section > summary { font-weight: 600; }
#nas-details .nas-section-title { margin-top: 24px; margin-bottom: 12px; }
#nas-details .nas-output {
  background: #020617; border-radius: 8px; padding: 14px; margin: 12px 0;
  overflow-x: auto; white-space: pre; tab-size: 4; font: .75rem/1.6 ui-monospace, monospace;
}
#nas-details .nas-mount { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
#nas-details .nas-table-scroll td { white-space: nowrap; }
#nas-details .nas-card h3 { overflow-wrap: anywhere; }
#nas-details .nas-card-heading h3 { min-width: 0; overflow-wrap: anywhere; }
#nas-details .nas-mdns-grid { margin-top: 10px; }
#nas-details .nas-process-controls { display: flex; align-items: center; gap: 12px; font-size: .875rem; margin: 14px 0; }
#nas-details select { border: 1px solid #64748b; border-radius: 8px; background: #1e293b; color: #f1f5f9; padding: 8px 12px; }
#nas-details .nas-build-filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
#nas-details .nas-build-filter { display: flex; flex-direction: column; gap: 6px; min-width: 150px; font-size: .8rem; }
#nas-details .nas-build-search { flex: 1; min-width: 240px; }
#nas-details .nas-build-filter input { border: 1px solid #64748b; border-radius: 8px; background: #1e293b; color: #f1f5f9; padding: 8px 12px; }
#nas-details .nas-build-link { color: #7dd3fc; text-decoration: underline; text-underline-offset: 3px; }
#nas-details .nas-build-link:hover { color: #bae6fd; }
#nas-details .nas-build-job { min-width: 220px; max-width: 380px; }
#nas-details .nas-build-job > span, #nas-details .nas-build-runner > span { display: block; margin-top: 4px; }
#nas-details .nas-build-job > span { white-space: normal; }
#nas-details .nas-build-ref { display: flex; flex-direction: column; gap: 4px; }
#nas-details .nas-build-pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 16px; }
@media (max-width: 700px) {
  #nas-details { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 16px; }
  #nas-details .nas-card-grid { grid-template-columns: minmax(0, 1fr); }
  #nas-details .nas-details-header { align-items: flex-start; }
  #nas-details h2 { font-size: 1.1rem; }
  #nas-details button { padding: 7px 10px; }
  #nas-details .nas-table-hint { display: block; }
  #nas-details .nas-build-filter, #nas-details .nas-build-search { min-width: 0; width: 100%; }
}
