﻿
    .server-probes { display: inline-flex; gap: 5px; align-items: center; }
    .server-probe {
      min-width: 24px; height: 24px; padding: 0 4px; border-radius: 4px;
      font-size: 0.65rem; font-weight: 700; letter-spacing: 0.02em;
      display: inline-flex; align-items: center; justify-content: center;
      border: 1px solid transparent; box-sizing: border-box;
    }
    .server-probe .server-probe-svg { width: 14px; height: 14px; display: block; flex-shrink: 0; }
    .server-probe-ok { background: rgba(45,155,90,.14); color: var(--success); border-color: rgba(45,155,90,.35); }
    .server-probe-bad { background: rgba(245,51,63,.10); color: var(--danger); border-color: rgba(245,51,63,.28); }
    .server-probe-warn { background: rgba(200,160,0,.12); color: #b8860b; border-color: rgba(200,160,0,.35); }
    .server-probe-muted { background: var(--surface); color: var(--text-muted); border-color: var(--border); }
    .server-hub-meta { gap: 4px; margin-bottom: 4px; }
    .server-hub-kv { gap: 14px; border-bottom-color: var(--border); }
    /* Server hub: remote sessions â€” one card; trigger row + list share the same border (no gap). */
    .server-hub-rds-stack:not([hidden]) {
      margin-top: 0;
      display: flex;
      flex-direction: column;
      width: 100%;
    }
    .server-hub-rds-unified {
      display: flex;
      flex-direction: column;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow-sm);
      overflow: hidden;
      max-height: min(48vh, 420px);
      min-height: 0;
    }
    .server-hub-rds-unified--expanded {
      min-height: min(200px, 28vh);
    }
    button.server-hub-rds-trigger.hz-cm-action-btn {
      margin: 0;
      flex-shrink: 0;
      border-radius: var(--radius);
      border: none;
      box-shadow: none;
    }
    .server-hub-rds-unified--expanded button.server-hub-rds-trigger.hz-cm-action-btn {
      border-radius: 0;
      border-bottom: 1px solid var(--border);
    }
    .server-hub-rds-result:not([hidden]) {
      margin: 0;
      border: none;
      border-radius: 0;
      box-shadow: none;
      background: transparent;
      display: flex;
      flex-direction: column;
      flex: 1;
      min-height: 0;
      max-height: none;
    }
    .server-hub-rds-result__inner {
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 0;
      min-height: 0;
      flex: 1;
    }
    .server-hub-rds-result .svc-picker-list-wrap {
      border: none;
      border-radius: 0;
      max-height: none;
      flex: 1;
      min-height: 0;
    }
    .server-hub-rds-result .svc-picker-list {
      min-height: 0;
    }
    .server-hub-rds-result .rds-session-panel {
      margin-top: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      overflow: visible;
    }
    .server-hub-rds-result__inner > .hz-rds-errors-details,
    .server-hub-rds-result__inner > details.users-hosting-meta {
      margin: 0;
      flex-shrink: 0;
      padding: 8px 12px;
      border-top: 1px solid var(--border);
      box-sizing: border-box;
    }
    .server-hub-rds-result .rds-session-row {
      border-bottom: 1px solid var(--border);
      transition: background .12s;
    }
    .server-hub-rds-result .rds-session-row:last-child {
      border-bottom: none;
    }
    .server-hub-rds-result .rds-session-row:hover {
      background: var(--bg2, var(--bg));
    }
    /* Server hub inventory (SQL / IIS): same card + list pattern as Remote Sessions */
    .server-hub-rds-stack .server-hub-rds-result .server-hub-inv-subhead {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 14px 6px;
      font-size: .72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .04em;
      color: var(--text-muted);
      background: var(--bg2, var(--bg));
      border-bottom: 1px solid var(--border);
    }
    .server-hub-rds-stack .server-hub-rds-result .server-hub-inv-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 14px;
      flex-wrap: wrap;
      border-bottom: 1px solid var(--border);
      transition: background .12s;
    }
    .server-hub-rds-stack .server-hub-rds-result .svc-picker-list > .server-hub-inv-row:last-child {
      border-bottom: none;
    }
    .server-hub-rds-stack .server-hub-rds-result .server-hub-inv-row:hover {
      background: var(--bg2, var(--bg));
    }
    .server-hub-inv-icon {
      font-size: 1.12rem;
      line-height: 1;
      flex-shrink: 0;
      width: 1.85rem;
      text-align: center;
    }
    .server-hub-inv-info { flex: 1; min-width: 0; }
    .server-hub-inv-title {
      font-size: .88rem;
      font-weight: 600;
      color: var(--text);
      font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .server-hub-inv-meta { font-size: .75rem; color: var(--text-muted); margin-top: 3px; }
    .server-hub-inv-actions {
      flex-shrink: 0;
      min-width: 4.5rem;
      text-align: right;
    }
    .server-hub-inv-actions:empty { display: none; }
    .server-hub-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
    /* Server hub Full AD: same collapsible pattern as user modal (hz-user-section-*) */
    .hz-user-groups-ul { list-style: none; padding: 0; margin: 0; max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: 6px; }
    .hz-user-groups-li {
      display: flex; gap: 8px; align-items: flex-start; justify-content: space-between;
      padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: .78rem;
    }
    .hz-user-groups-li:last-child { border-bottom: none; }
    .hz-user-groups-name { flex: 1; font-weight: 600; font-size: .88rem; color: var(--text); cursor: default; }
    .server-hub-title-row {
      display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
      row-gap: 6px;
    }
    .server-hub-title-row .modal-title { margin: 0; }
    .eventlog-job-row {
      display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px;
      border: 1px solid var(--border); border-radius: 6px; background: var(--surface); margin-bottom: 6px;
    }
    .eventlog-job-row .machine-name { font-family: monospace; color: var(--text); }
    .eventlog-job-row .machine-status { color: var(--text-muted); flex: 1; }
    .eventlog-job-row .btn-dl {
      padding: 4px 12px; font-weight: 600; background: rgba(34,197,94,.1); color: #16a34a;
      border: 1px solid rgba(34,197,94,.3); border-radius: 5px; cursor: pointer; white-space: nowrap;
    }
    .eventlog-job-row .btn-dl:hover { background: #16a34a; color: #fff; }
    .eventlog-job-row .btn-dl:disabled { opacity: .5; cursor: not-allowed; }
    .eventlog-progress { padding: 14px 0; color: var(--text-muted); display: flex; align-items: center; gap: 10px; }
    .users-hosting-panel {
      margin: 0 0 16px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--border);
      background: var(--surface); line-height: 1.45;
    }
    .users-hosting-panel h3 { margin: 0 0 8px; font-weight: 600; }
    .users-hosting-meta { color: var(--text-muted); font-family: ui-monospace, monospace; margin-bottom: 10px; word-break: break-all; }
    .users-hosting-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; margin: 6px 0; }
    .users-hosting-dt { font-weight: 600; color: var(--text-soft); min-width: 2.75rem; margin: 0; flex-shrink: 0; }
    .users-hosting-val { margin: 0; font-family: ui-monospace, monospace; color: var(--accent); flex: 1; min-width: 0; word-break: break-all; }
    .users-hosting-miss { color: var(--text-muted); }
    .users-hosting-warn { margin-top: 8px; color: #a67c00; }

    /* Run history filters: same control height & aligned columns */
    .sched-runs-filters.filters {
      display: grid;
      grid-template-columns: minmax(0, 1fr) repeat(3, minmax(0, 7.5rem)) auto;
      gap: 12px 14px;
      align-items: end;
    }
    .sched-runs-filters .filter-group {
      min-width: 0;
      width: 100%;
    }
    .sched-runs-filters .filter-group select,
    .sched-runs-filters .filter-group input[type="text"] {
      width: 100%;
      box-sizing: border-box;
      min-height: 2.35rem;
      line-height: 1.25;
    }
    .sched-runs-filters .btn {
      align-self: end;
      white-space: nowrap;
    }
    @media (max-width: 900px) {
      .sched-runs-filters.filters {
        grid-template-columns: 1fr 1fr;
      }
      .sched-runs-filters .btn { grid-column: 1 / -1; justify-self: start; }
    }
    #sched-modal-id[readonly] {
      opacity: 0.88;
      cursor: default;
    }

    .svc-picker-wrap { margin-bottom: 4px; }
    /* "Find service" only â€” not row labels; undo .filter-group label uppercase */
    .svc-picker-wrap > label[for="svc-modal-filter"],
    #tab-eventlog-capture .svc-picker-wrap > label[for="servers-eventlog-filter"],
    #sched-modal-catalog-fields .sched-catalog-pickers .svc-picker-wrap > label[for="sched-catalog-host-filter"],
    #sched-modal-catalog-fields .sched-catalog-pickers .svc-picker-wrap > label[for="sched-catalog-svc-filter"] {
      margin-bottom: 6px;
      text-transform: none;
      letter-spacing: 0.02em;
      font-size: .72rem;
      font-weight: 600;
      color: var(--text-muted);
    }
    /* common/styles.css .filter-group label { text-transform: uppercase } inherits into row labels */
    .filter-group label.svc-picker-row {
      text-transform: none;
      letter-spacing: normal;
      font-size: inherit;
      font-weight: 400;
      color: var(--text);
      margin-bottom: 0;
    }
    .svc-picker-wrap input[type="search"] {
      width: 100%; box-sizing: border-box; min-height: 2.35rem; margin-bottom: 10px;
    }
    .svc-picker-list-wrap {
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: var(--surface);
      max-height: min(340px, 42vh);
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }
    .svc-picker-list {
      overflow-y: auto;
      flex: 1;
      min-height: 120px;
    }
    .svc-picker-row {
      width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--border);
      background: transparent; padding: 8px 12px; cursor: pointer;
      display: grid;
      grid-template-columns: auto 1fr auto;
      gap: 6px 12px;
      align-items: center;
      color: var(--text);
      transition: background .12s;
    }
    .svc-picker-row:last-child { border-bottom: 0; }
    .svc-picker-row:hover { background: var(--bg2); }
    .svc-picker-row.selected {
      background: rgba(var(--accent-rgb), .12);
      box-shadow: inset 3px 0 0 var(--accent);
    }
    .svc-picker-row input[type="checkbox"],
    .svc-picker-row input[type="radio"] {
      margin: 0;
      width: 1rem;
      height: 1rem;
      cursor: pointer;
      flex-shrink: 0;
    }
    .svc-picker-row-main {
      min-width: 0;
      font-family: 'Inter', system-ui, -apple-system, sans-serif;
    }
    .svc-picker-row-name {
      font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
      font-size: .82rem;
      font-weight: 700;
      color: var(--text);
      letter-spacing: 0;
      word-break: break-all;
    }
    .svc-picker-row-disp {
      font-family: 'Inter', system-ui, -apple-system, sans-serif;
      font-size: .78rem;
      font-weight: 400;
      color: var(--text-muted);
      margin-top: 3px;
      line-height: 1.4;
      letter-spacing: 0.01em;
      word-break: break-word;
    }
    .svc-picker-row-status {
      font-size: .65rem;
      font-weight: 600;
      letter-spacing: 0.01em;
      padding: 2px 7px;
      border-radius: 999px;
      border: 1px solid var(--border);
      color: var(--text-muted);
      white-space: nowrap;
      align-self: start;
    }
    .svc-picker-row-status.running {
      background: rgba(45,155,90,.12);
      color: #2D9B5A;
      border-color: rgba(45,155,90,.35);
    }
    .svc-picker-row-status.stopped {
      background: rgba(120,120,120,.1);
      color: var(--text-muted);
    }
    .svc-picker-empty {
      padding: 20px 14px;
      text-align: center;
      font-size: .82rem;
      color: var(--text-muted);
    }
    .svc-picker-summary {
      margin-top: 10px;
      font-size: .78rem;
      color: var(--text-muted);
      min-height: 1.25em;
    }
    .svc-picker-summary strong {
      color: var(--text);
      font-family: ui-monospace, monospace;
      font-weight: 600;
    }

    /* Event log capture tab (multi-host WinRM; super_user) */
    .hz-eventlog-capture-page {
      margin-top: 4px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow-sm);
    }
    .hz-eventlog-capture-page-inner {
      padding: 14px 16px 16px;
    }
    .hz-eventlog-capture-page .svc-picker-list-wrap {
      max-height: min(380px, 48vh);
    }
    .servers-eventlog-hint {
      margin: 0 0 14px;
      font-size: .8rem;
      color: var(--text-muted);
      line-height: 1.45;
      max-width: 52rem;
    }
    .servers-eventlog-status {
      margin-top: 14px;
      min-height: 0;
    }
    /* Event log list: only Reachable hosts are selectable */
    label.svc-picker-row.servers-eventlog-row-muted {
      opacity: 0.5;
      cursor: not-allowed;
    }
    label.svc-picker-row.servers-eventlog-row-muted .svc-picker-row-name {
      color: var(--text-muted);
    }
    label.svc-picker-row.servers-eventlog-row-muted input[type="checkbox"],
    label.svc-picker-row.servers-eventlog-row-muted input[type="radio"] {
      cursor: not-allowed;
      opacity: 0.7;
    }
    .hz-eventlog-fetch-banner:not([hidden]) {
      margin-bottom: 14px;
    }

    /* RDS session panel (user drawer; same layout as Spruce) */
    .rds-session-panel {
      margin-top: 14px;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      overflow: hidden;
    }
    .rds-session-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 14px;
      gap: 12px;
      flex-wrap: wrap;
    }
    .rds-session-info { flex: 1; min-width: 0; }
    .rds-session-server {
      font-size: .88rem; font-weight: 600; color: var(--text);
      font-family: monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .rds-server-link {
      background: none; border: none; padding: 0; cursor: pointer; text-align: left;
      font-size: .88rem; font-weight: 600; color: var(--accent);
      font-family: monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px;
      transition: opacity .15s;
    }
    .rds-server-link:hover { opacity: .75; }
    #rds-broker-table .rds-session-state { font-size: 0.72rem; padding: 2px 8px; border-radius: 999px; display: inline-block; }
    /* Broker grid: fixed columns + clip long FQDNs (global .table-scroll td uses overflow:visible) */
    .table-wrap .table-scroll #rds-broker-table { table-layout: fixed; width: 100%; }
    .table-wrap .table-scroll #rds-broker-table th,
    .table-wrap .table-scroll #rds-broker-table td {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      vertical-align: middle;
      max-width: none;
    }
    .table-wrap .table-scroll #rds-broker-table td:nth-child(1),
    .table-wrap .table-scroll #rds-broker-table td:nth-child(5) {
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: break-word;
    }
    .table-wrap .table-scroll #rds-broker-table td:nth-child(7) {
      white-space: normal;
      font-size: 0.78rem;
      line-height: 1.35;
    }
    .table-wrap .table-scroll #rds-broker-table th:nth-child(1),
    .table-wrap .table-scroll #rds-broker-table td:nth-child(1) { width: 13%; min-width: 0; }
    .table-wrap .table-scroll #rds-broker-table th:nth-child(2),
    .table-wrap .table-scroll #rds-broker-table td:nth-child(2) { width: 20%; min-width: 0; }
    .table-wrap .table-scroll #rds-broker-table th:nth-child(3),
    .table-wrap .table-scroll #rds-broker-table td:nth-child(3) { width: 5rem; min-width: 5rem; }
    .table-wrap .table-scroll #rds-broker-table th:nth-child(4),
    .table-wrap .table-scroll #rds-broker-table td:nth-child(4) { width: 6.25rem; min-width: 6.25rem; }
    .table-wrap .table-scroll #rds-broker-table th:nth-child(5),
    .table-wrap .table-scroll #rds-broker-table td:nth-child(5) { width: 14%; min-width: 0; }
    .table-wrap .table-scroll #rds-broker-table th:nth-child(6),
    .table-wrap .table-scroll #rds-broker-table td:nth-child(6) { width: 4.5rem; min-width: 4.5rem; }
    .table-wrap .table-scroll #rds-broker-table th:nth-child(7),
    .table-wrap .table-scroll #rds-broker-table td:nth-child(7) { width: 9.5rem; min-width: 7rem; }
    .table-wrap .table-scroll #rds-broker-table th:nth-child(8),
    .table-wrap .table-scroll #rds-broker-table td:nth-child(8) { width: 6.25rem; min-width: 6.25rem; text-align: center; }
    @media (max-width: 768px) {
      .table-wrap .table-scroll #rds-broker-table,
      .table-wrap .table-scroll #rds-broker-table th,
      .table-wrap .table-scroll #rds-broker-table td {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        white-space: normal !important;
      }
    }
    .table-wrap .table-scroll #rds-broker-table .rds-broker-host-link {
      display: block;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
    }
    tr.muted-row td { opacity: 0.45; }
    .rds-session-meta {
      font-size: .75rem; color: var(--text-muted); margin-top: 3px;
    }
    .rds-session-state {
      font-size: .72rem; font-weight: 600; padding: 3px 10px;
      border-radius: 999px; text-transform: uppercase; white-space: nowrap;
    }
    .rds-session-state.active  { background: rgba(45,155,90,0.1);  color: #2D9B5A; }
    .rds-session-state.disc    { background: rgba(213,118,2,0.1);   color: #D57602; }
    .rds-no-session {
      padding: 14px; text-align: center;
      font-size: .85rem; color: var(--text-muted);
    }
    .btn-logoff {
      padding: 5px 14px; font-size: .78rem; font-weight: 600; border-radius: var(--radius-sm);
      background: rgba(220,53,69,0.08); color: #dc3545;
      border: 1px solid rgba(220,53,69,0.25); cursor: pointer; white-space: nowrap;
      transition: all .15s;
    }
    .btn-logoff:hover  { background: #dc3545; color: #fff; border-color: #dc3545; }
    .btn-logoff:disabled { opacity: .5; cursor: not-allowed; }
    [data-theme="dark"] .rds-session-panel { border-color: #30363D; }
    [data-theme="dark"] .rds-session-state.active { background: rgba(45,155,90,0.15); }
    [data-theme="dark"] .rds-session-state.disc   { background: rgba(213,118,2,0.15); }
    .hz-rds-actions {
      display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px;
    }
    .hz-rds-msg-error {
      margin-top: 8px;
      font-size: 0.78rem;
      color: var(--danger);
      padding: 8px 10px;
      border-radius: var(--radius-sm);
      border: 1px solid rgba(245,51,63,0.28);
      background: rgba(245,51,63,0.08);
    }
    .hz-rds-errors-details summary { cursor: pointer; user-select: none; }
    .hz-rds-errors-details summary:hover { color: var(--text); }

    /* User modal: whole card scrolls; disclosure panels keep inner scroll + theme surface */
    #hz-user-modal.modal.wide {
      max-height: min(92vh, calc(100dvh - 32px));
      min-height: 0;
      overflow-x: hidden;
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
    }
    #hz-user-modal .modal-body {
      flex: 0 1 auto;
      min-height: 0;
      overflow-x: hidden;
      overflow-y: visible;
    }
    /* User modal: expandables use same section title style as RDS (no bordered card) */
    .hz-user-section-details {
      margin: 0;
      padding: 0;
      border: none;
      background: transparent;
      overflow: visible;
    }
    .hz-user-section-summary {
      list-style: none;
      cursor: pointer;
      user-select: none;
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      padding: 0;
      margin: 0;
      background: transparent;
    }
    .hz-user-section-summary::-webkit-details-marker {
      display: none;
    }
    .hz-user-section-summary .section-label {
      flex: 1;
      min-width: 0;
      margin-top: 18px;
      margin-bottom: 0;
    }
    .hz-user-section-chevron {
      flex-shrink: 0;
      font-size: 0.65rem;
      opacity: 0.55;
      color: var(--text-muted);
      transition: transform 0.2s ease, color 0.15s ease;
      margin-top: 18px;
      align-self: center;
    }
    .hz-user-section-details[open] > .hz-user-section-summary .hz-user-section-chevron {
      transform: rotate(90deg);
    }
    .hz-user-section-summary:hover .hz-user-section-chevron {
      color: var(--accent);
      opacity: 1;
    }
    .hz-user-section-body {
      margin-top: 10px;
      padding: 0;
      overflow: visible;
      max-height: none;
      color: var(--text);
    }
    .hz-user-section-body .kv-val {
      color: var(--text-body, var(--text));
    }
    .hz-user-section-body .hz-user-groups-ul {
      max-height: none;
      overflow: visible;
    }

  /* PS Forms */
  .psforms-subtabs { display:flex; gap:6px; margin-bottom:18px; border-bottom:1px solid var(--border); padding-bottom:0; }
  .psforms-subtab { padding:8px 18px; border-radius:6px 6px 0 0; border:1px solid transparent; border-bottom:none; background:transparent; cursor:pointer; font-size:.88rem; font-weight:600; color:var(--text-muted); transition:color .15s,background .15s; }
  .psforms-subtab.active { background:var(--surface); border-color:var(--border); color:var(--accent); margin-bottom:-1px; }
  .psforms-subtab:hover:not(.active) { color:var(--text); }
  .psforms-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:16px; margin-top:4px; }
  .psform-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px 20px; display:flex; flex-direction:column; gap:10px; transition:border-color .15s,box-shadow .15s; }
  .psform-card:hover { border-color:var(--accent); box-shadow:0 4px 16px rgba(var(--accent-rgb),.1); }
  .psform-card-header { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; flex-wrap:wrap; }
  .psform-card-name { font-weight:700; font-size:.95rem; color:var(--text); }
  .psform-tags { display:flex; flex-wrap:wrap; gap:4px; margin-top:2px; }
  .psform-tag { padding:2px 8px; border-radius:10px; font-size:.72rem; font-weight:600; background:rgba(var(--accent-rgb),.12); color:var(--accent); border:1px solid rgba(var(--accent-rgb),.25); }
  .psform-card-desc { font-size:.83rem; color:var(--text-muted); line-height:1.4; }
  .psform-card-actions { display:flex; gap:8px; margin-top:auto; padding-top:4px; }
  .psform-field { margin-bottom:14px; }
  .psform-field-help { color:var(--text-muted); margin-top:4px; }
  .psform-checkbox { width:18px; height:18px; margin-top:8px; }
  .psforms-run-status { padding:10px 14px; border-radius:7px; font-size:.88rem; font-weight:600; margin-bottom:12px; display:flex; align-items:center; gap:10px; }
  .psforms-run-ok { background:rgba(45,155,90,.1); color:var(--success); border:1px solid rgba(45,155,90,.25); }
  .psforms-run-fail { background:rgba(220,38,38,.08); color:#dc2626; border:1px solid rgba(220,38,38,.2); }
  .psforms-run-duration { font-weight:400; opacity:.8; margin-left:auto; }
  .psforms-output-label { font-weight:600; color:var(--text-muted); margin-bottom:4px; text-transform:uppercase; letter-spacing:.04em; }
  .psforms-output-label-err { color:#dc2626; }
  .psforms-output { background:var(--bg); border:1px solid var(--border); border-radius:6px; padding:12px 14px; font-family:monospace; color:var(--text); white-space:pre-wrap; word-break:break-all; max-height:240px; overflow-y:auto; margin-bottom:10px; }
  .psforms-output-err { border-color:rgba(220,38,38,.3); }
  .psforms-script-label { font-weight:600; color:var(--text-muted); margin-bottom:6px; }
  .psforms-script-area { width:100%; font-family:monospace; background:var(--bg); color:var(--text); border:1px solid var(--border); border-radius:6px; padding:10px 12px; box-sizing:border-box; resize:vertical; }
  .psf-builder-param-row { padding:10px 12px; background:var(--bg); border:1px solid var(--border); border-radius:8px; margin-bottom:8px; }
  .psf-param-fields { display:flex; flex-wrap:wrap; gap:8px; align-items:flex-start; }

  /* Customer modal stacks above main UI; user / vault-launch above this when nested */
  #hz-customer-modal-overlay.open { z-index: 310; }
  #hz-user-modal-overlay.open { z-index: 340; }
  #vault-launch-modal-overlay.open { z-index: 350; }

  .hz-cm-hosting-check {
    margin-bottom: 12px;
  }
  .hz-cm-hosting-msg {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 12px 14px;
    border-radius: var(--radius-sm, 6px);
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.88rem;
    color: var(--text-muted);
  }
  .hz-cm-hosting-msg .spinner { flex-shrink: 0; }
  button.hz-cm-host-link {
    font: inherit;
    font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
    font-size: inherit;
    color: var(--accent);
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    text-align: left;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    word-break: break-all;
  }
  button.hz-cm-host-link:hover {
    color: var(--text);
  }
  .hz-cm-host-plain {
    font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
    font-size: inherit;
    color: inherit;
    word-break: break-all;
  }
  .hz-cm-name-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }
  .hz-cm-name-list li {
    margin: 0;
    line-height: 1.35;
    font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
    word-break: break-all;
  }
  .hz-cm-name-list li:first-child {
    font-weight: 600;
  }
  .hz-cm-iis-sites {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
  }
  .hz-cm-iis-site {
    border: 1px solid var(--border, #d8dee6);
    border-radius: 6px;
    background: var(--surface-2, rgba(0, 0, 0, 0.03));
    overflow: hidden;
  }
  .hz-cm-iis-site-summary {
    cursor: pointer;
    list-style: none;
    padding: 0.4rem 0.55rem;
    font-weight: 600;
    user-select: none;
  }
  .hz-cm-iis-site-summary::-webkit-details-marker { display: none; }
  .hz-cm-iis-site-summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 0.35rem;
    color: var(--text-muted, #6b7280);
    transition: transform 0.12s ease;
  }
  .hz-cm-iis-site[open] > .hz-cm-iis-site-summary::before {
    transform: rotate(90deg);
  }
  .hz-cm-iis-site-body {
    padding: 0 0.55rem 0.55rem;
    border-top: 1px solid var(--border, #e5e7eb);
  }
  .hz-cm-iis-site-hint,
  .hz-cm-iis-site-err,
  .hz-cm-iis-muted {
    margin: 0.45rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted, #6b7280);
  }
  .hz-cm-iis-site-hint .spinner {
    width: 0.85rem;
    height: 0.85rem;
    margin-right: 0.35rem;
    vertical-align: -0.15rem;
  }
  .hz-cm-iis-site-err { color: var(--danger, #b91c1c); }
  .hz-cm-iis-detail { margin-top: 0.45rem; }
  .hz-cm-iis-detail-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    align-items: baseline;
    margin: 0.25rem 0;
    font-size: 0.88rem;
  }
  .hz-cm-iis-detail-block { margin-top: 0.55rem; }
  .hz-cm-iis-detail-k {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-muted, #6b7280);
    font-weight: 600;
  }
  .hz-cm-iis-detail-v { font-size: 0.88rem; }
  .hz-cm-iis-list {
    margin: 0.25rem 0 0;
    padding-left: 1.1em;
    font-size: 0.88rem;
  }
  .hz-cm-iis-list li { margin: 0.15em 0; }
  .hz-cm-iis-list code {
    font-size: 0.82em;
    padding: 0.05em 0.3em;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.06);
  }
  a.hz-cm-iis-bind-link {
    color: var(--accent, #1d4ed8);
    text-decoration: none;
    word-break: break-all;
    font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
    font-size: 0.88rem;
  }
  a.hz-cm-iis-bind-link:hover { text-decoration: underline; }
  .hz-cm-iis-bind-text {
    word-break: break-all;
  }
  .hz-cm-iis-bind-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
  }
  .hz-cm-iis-bind-url { min-width: 0; flex: 1 1 auto; }
  .hz-cm-iis-cf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    line-height: 0;
  }
  .hz-cm-iis-cf-icon {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
  }
  .hz-cm-iis-cf--on .hz-cm-iis-cf-icon {
    fill: #f6821f;
  }
  .hz-cm-iis-cf--off .hz-cm-iis-cf-icon {
    fill: #9ca3af;
  }
  .hz-cm-iis-cf--unknown .hz-cm-iis-cf-icon {
    fill: #d1d5db;
  }
  .hz-cm-iis-pool-name { font-family: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace; }
  .hz-cm-iis-state {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.1em 0.45em;
    border-radius: 999px;
    border: 1px solid transparent;
  }
  .hz-cm-iis-state--started {
    color: #166534;
    background: #dcfce7;
    border-color: #bbf7d0;
  }
  .hz-cm-iis-state--stopped {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fecaca;
  }
  .hz-cm-iis-state--unknown {
    color: #4b5563;
    background: #f3f4f6;
    border-color: #e5e7eb;
  }

  /* Customer + server hub modals: vertical action list with icons */
  .hz-cm-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
  }
  .hz-cm-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
    text-align: left;
    font: inherit;
    width: 100%;
    box-sizing: border-box;
  }
  .hz-cm-action-btn:hover {
    background: var(--bg2, var(--bg));
    border-color: var(--accent);
  }
  /* Our flex layout overrides the UA [hidden] rule â€” without this, â€œhiddenâ€ RDSH actions stay visible */
  .hz-cm-action-btn[hidden] {
    display: none !important;
  }
  .hz-cm-action-btn.primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
  }
  .hz-cm-action-btn.primary:hover {
    filter: brightness(0.94);
    border-color: var(--accent);
  }
  .hz-cm-action-btn.primary .hz-cm-action-text { color: #fff; }
  a.hz-cm-action-btn.hz-cm-action-link {
    text-decoration: none;
    color: var(--text);
  }
  a.hz-cm-action-btn.hz-cm-action-link .hz-cm-action-text {
    color: var(--text);
  }
  .hz-cm-action-icon { line-height: 1; flex-shrink: 0; }
  .hz-cm-action-text { font-weight: 600; }

  /* User modal: RDS / groups panels reuse server-hub unified card; nested row actions */
  #hz-user-modal .hz-user-rds-inner {
    padding: 12px 12px 14px;
    box-sizing: border-box;
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    max-height: min(44vh, 400px);
  }
  #hz-user-modal .hz-user-groups-inner {
    padding: 12px 12px 14px;
    box-sizing: border-box;
    max-height: min(40vh, 360px);
    overflow-y: auto;
  }
  #hz-user-modal .hz-user-modal-subactions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
  }
  #hz-user-modal .hz-user-modal-subactions .hz-cm-action-btn {
    padding: 11px 14px;
  }
  #hz-user-modal .hz-cm-action-btn.loading {
    opacity: 0.68;
    pointer-events: none;
  }

  /* Horizon header: grouped menus (Customers / Servers) */
  nav.hz-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px 18px;
    margin-left: auto;
    justify-content: flex-end;
    max-width: 100%;
  }
  .hz-nav-cluster {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }
  .hz-nav-cluster .hz-nav-hub {
    margin: 0;
  }
  .hz-nav-cluster .hz-nav-flyout {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    min-width: 200px;
    padding: 6px;
    margin-top: 2px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    z-index: 120;
  }
  .hz-nav-cluster:hover .hz-nav-flyout,
  .hz-nav-cluster:focus-within .hz-nav-flyout,
  .hz-nav-cluster.hz-nav-cluster--open .hz-nav-flyout {
    display: flex;
  }
  /* Pointer left the whole nav â€” hide flyouts until a hub is hovered again (see JS). */
  nav.hz-nav.hz-nav--pointer-outside .hz-nav-cluster .hz-nav-flyout {
    display: none !important;
  }
  /* After choosing a tab, collapse flyout (beats :hover / :focus-within on the cluster) */
  .hz-nav-cluster.hz-nav-cluster--flyout-dismissed .hz-nav-flyout {
    display: none !important;
  }
  .hz-nav-cluster .hz-nav-flyout button {
    text-align: left;
    width: 100%;
    justify-content: flex-start;
  }
  .hz-nav-hub--lit {
    background: rgba(var(--accent-rgb), 0.07) !important;
    border-color: rgba(var(--accent-rgb), 0.25) !important;
    color: var(--accent) !important;
    font-weight: 600 !important;
  }

