/* Spruce — product-specific layout (shared UI in components.css) */

/* ── EDC structured credential (Vault) ──────────────────────────────────── */
.cred-edc-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.cred-edc-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cred-edc-field-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.cred-edc-input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font-size: .82rem;
  font-family: monospace;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}
.cred-edc-reveal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
}
.cred-edc-reveal-k {
  min-width: 92px;
  font-size: .74rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.cred-edc-reveal-v {
  flex: 1;
  word-break: break-all;
  color: var(--accent);
}

#sp-rds-broker-table { table-layout: fixed; width: 100%; }
#sp-rds-broker-table th:nth-child(1), #sp-rds-broker-table td:nth-child(1) { width: 13%; }
#sp-rds-broker-table th:nth-child(2), #sp-rds-broker-table td:nth-child(2) { width: 20%; }
#sp-rds-broker-table th:nth-child(3), #sp-rds-broker-table td:nth-child(3) { width: 5rem; }
#sp-rds-broker-table th:nth-child(4), #sp-rds-broker-table td:nth-child(4) { width: 6.25rem; }
#sp-rds-broker-table th:nth-child(5), #sp-rds-broker-table td:nth-child(5) { width: 14%; }
#sp-rds-broker-table th:nth-child(6), #sp-rds-broker-table td:nth-child(6) { width: 4.5rem; }
#sp-rds-broker-table th:nth-child(7), #sp-rds-broker-table td:nth-child(7) { width: 8rem; }
#sp-rds-broker-table th:nth-child(8), #sp-rds-broker-table td:nth-child(8) { width: 90px; }
#sp-rds-broker-table .rds-session-state {
  font-size: var(--font-size-xs); padding: 2px 8px; border-radius: 999px; display: inline-block;
}

.sp-user-meta { display: flex; flex-direction: column; gap: 0; }

.hz-cm-actions { gap: 6px; }

.netnew-intro {
  font-size: var(--font-size-md); color: var(--text-muted);
  max-width: 720px; line-height: var(--line-height-relaxed); margin-bottom: var(--space-5);
}
.netnew-intro code { font-size: var(--font-size-sm); }
.cust-setup-shared {
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5); margin-bottom: var(--space-5); background: var(--surface-2);
}
.cust-setup-shared h3 { margin: 0 0 var(--space-3); font-size: var(--font-size-md); color: var(--text-primary); }
.cust-setup-step {
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5); margin-bottom: 14px; background: var(--surface-1);
}
.cust-setup-step h3 { margin: 0 0 var(--space-2); font-size: var(--font-size-md); color: var(--text-primary); }
.cust-setup-step .step-num { color: var(--action); font-weight: var(--font-weight-bold); margin-right: 6px; }
.cust-setup-seq {
  margin: 18px 0 0; padding: var(--space-3) var(--space-4);
  border: 1px dashed var(--border-subtle); border-radius: var(--radius-sm);
  font-size: var(--font-size-sm); color: var(--text-muted);
}
.netnew-form-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px 18px; max-width: 960px;
}
.netnew-form-grid .full-row { grid-column: 1 / -1; }
.netnew-check { margin-top: 0; }
.netnew-status {
  margin-top: var(--space-4); padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm); border: 1px solid var(--border-subtle);
  background: var(--surface-1); font-size: var(--font-size-sm);
}
.netnew-status.running { border-color: rgba(var(--success-rgb), 0.35); }
.netnew-status.done { border-color: var(--border-subtle); opacity: .95; }
.netnew-logs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
@media (max-width: 900px) { .netnew-logs { grid-template-columns: 1fr; } }
.netnew-log-title {
  font-size: var(--font-size-xs); font-weight: var(--font-weight-bold);
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); margin-bottom: 6px;
}
.netnew-log-pre {
  margin: 0; padding: var(--space-3); min-height: 120px; max-height: 420px; overflow: auto;
  font-size: var(--font-size-sm); line-height: 1.45; font-family: var(--eci-font-family-mono);
  background: var(--surface-2); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); white-space: pre-wrap; word-break: break-word;
}
.app-footer {
  margin-top: 18px; padding: 10px 20px 14px;
  color: var(--text-muted); font-size: var(--font-size-sm);
  text-align: right; border-top: 1px solid var(--border-subtle);
}

nav.sp-nav {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  gap: 10px 18px; margin-left: auto; justify-content: flex-end; max-width: 100%;
}
.sp-nav-cluster { position: relative; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sp-nav-cluster .sp-nav-hub { margin: 0; }
.sp-nav-cluster .sp-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-2); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md); z-index: 120;
}
.sp-nav-cluster:hover .sp-nav-flyout,
.sp-nav-cluster:focus-within .sp-nav-flyout,
.sp-nav-cluster.sp-nav-cluster--open .sp-nav-flyout { display: flex; }
nav.sp-nav.sp-nav--pointer-outside .sp-nav-cluster .sp-nav-flyout { display: none !important; }
.sp-nav-cluster.sp-nav-cluster--flyout-dismissed .sp-nav-flyout { display: none !important; }
.sp-nav-cluster .sp-nav-flyout button { text-align: left; width: 100%; justify-content: flex-start; }
.sp-nav-hub--lit {
  background: rgba(var(--action-rgb), 0.07) !important;
  border-color: rgba(var(--action-rgb), 0.25) !important;
  color: var(--action) !important;
  font-weight: var(--font-weight-semibold) !important;
}

/* Customer card pod badge — matches customer-user-count font size */
.customer-pod-badge {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: var(--space-1);
  vertical-align: middle;
  border: 1px solid var(--border-subtle);
}

/* Customer SystemType — small glassy color pills */
.sp-system-type-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  vertical-align: middle;
}
.sp-system-type-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  line-height: 1.35;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-inset-highlight, inset 0 1px 0 rgba(255, 255, 255, 0.08));
}
.sp-system-type-warn {
  flex-shrink: 0;
  font-size: 0.85rem;
  line-height: 1;
  cursor: help;
}
.sp-system-type--production {
  color: var(--success);
  background: rgba(var(--success-rgb), 0.16);
  border-color: rgba(var(--success-rgb), 0.35);
}
.sp-system-type--pre-production {
  color: #c99212;
  background: rgba(var(--warning-rgb), 0.18);
  border-color: rgba(var(--warning-rgb), 0.38);
}
[data-theme="dark"] .sp-system-type--pre-production { color: #f0c44a; }
.sp-system-type--customertest {
  color: #c2410c;
  background: rgba(249, 115, 22, 0.16);
  border-color: rgba(249, 115, 22, 0.38);
}
[data-theme="dark"] .sp-system-type--customertest { color: #fb923c; }
.sp-system-type--historical {
  color: #f1f5f9;
  background: rgba(15, 18, 28, 0.72);
  border-color: rgba(255, 255, 255, 0.14);
}
[data-theme="light"] .sp-system-type--historical {
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(15, 23, 42, 0.95);
}
.sp-system-type--cancelled {
  color: var(--danger);
  background: rgba(var(--danger-rgb), 0.16);
  border-color: rgba(var(--danger-rgb), 0.36);
}
.sp-system-type--migration {
  color: #a21caf;
  background: rgba(192, 38, 211, 0.14);
  border-color: rgba(192, 38, 211, 0.34);
}
[data-theme="dark"] .sp-system-type--migration { color: #e879f9; }
.sp-system-type--vendor {
  color: #0f766e;
  background: rgba(20, 184, 166, 0.14);
  border-color: rgba(20, 184, 166, 0.36);
}
[data-theme="dark"] .sp-system-type--vendor { color: #2dd4bf; }
.sp-system-type--internal {
  color: var(--info, #2563eb);
  background: rgba(var(--info-rgb), 0.16);
  border-color: rgba(var(--info-rgb), 0.36);
}
.sp-system-type--unknown {
  color: var(--text-secondary);
  background: rgba(128, 128, 128, 0.14);
  border-color: rgba(128, 128, 128, 0.32);
}

/* Software Version modal */
.sp-sv-label-btn {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--link, var(--action));
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}
.sp-sv-label-btn:hover { opacity: 0.85; color: var(--action); }
.sp-sv-current {
  text-align: center;
  padding: var(--space-5) var(--space-4);
  margin-bottom: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--glass-bg, var(--surface-2));
  border: 1px solid var(--glass-border, var(--border-subtle));
}
.sp-sv-current-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.sp-sv-current-value {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  line-height: 1.2;
}
.sp-sv-current-date {
  margin-top: 6px;
  font-size: var(--font-size-sm);
  color: var(--text-secondary, var(--text-muted));
}
.sp-sv-meta {
  margin-top: 8px;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}
.sp-sv-section {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}
.sp-sv-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.sp-sv-section-title {
  margin: 0 0 4px;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}
.sp-sv-section-sub {
  margin: 0 0 12px;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}
.sp-sv-path { word-break: break-all; }
.sp-sv-empty {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px dashed var(--border-subtle);
}
.sp-sv-not-scheduled {
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
}
.sp-sv-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}
.sp-sv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}
.sp-sv-table th,
.sp-sv-table td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.sp-sv-table th {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--surface-2);
}
.sp-sv-table tr:last-child td { border-bottom: none; }
.sp-sv-schedule-grid {
  display: grid;
  gap: 10px;
}
.sp-sv-kv {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: baseline;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
}
.sp-sv-k {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: var(--font-weight-semibold);
  min-width: 10rem;
}
.sp-sv-v { color: var(--text-primary); font-size: var(--font-size-md); }
.sp-sv-tz {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  background: rgba(var(--info-rgb, 110, 184, 255), 0.14);
  color: var(--info, #60a5fa);
  border: 1px solid rgba(var(--info-rgb, 110, 184, 255), 0.32);
}
.sp-sv-note {
  margin: 10px 0 0;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}
.sp-sv-log-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.sp-sv-log-panel {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow: hidden;
}
.sp-sv-log-pre {
  margin: 0;
  padding: 12px 14px;
  max-height: 320px;
  overflow: auto;
  font-family: var(--eci-font-family-mono, ui-monospace, monospace);
  font-size: var(--font-size-xs);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-primary);
}
.sp-sv-log-status {
  margin-top: 8px;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}
.sp-sv-log-status.ok { color: var(--success); }
.sp-sv-log-status.err { color: var(--danger); }

/* Filter select used on Customers and Servers tabs */
.filter-select {
  height: var(--control-height-md, 40px);
  font-size: var(--font-size-md);
  padding: 0 var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-primary);
  min-width: 120px;
}

/* ── Spruce Fleet Dashboard ──────────────────────────────────────────────── */
.sp-dash-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin: 0 0 18px;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}
.sp-dash-meta strong {
  color: var(--text-primary);
  font-weight: var(--font-weight-semibold);
}
.sp-dash-sync-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.12);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  line-height: 1.45;
}
.sp-dash-sync-alert strong {
  font-weight: var(--font-weight-semibold);
}
.sp-dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.sp-dash-stat {
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.sp-dash-stat--clickable {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.sp-dash-stat--clickable:hover {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(248, 113, 113, 0.08);
}
.sp-dash-stat--clickable:focus-visible {
  outline: 2px solid rgba(248, 113, 113, 0.7);
  outline-offset: 2px;
}
.sp-dash-stat--clickable .sp-dash-stat-value {
  color: #f87171;
}
.sp-dash-stat-hint {
  display: block;
  margin-top: 4px;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  font-weight: var(--font-weight-normal);
  text-transform: none;
  letter-spacing: 0;
}
.sp-dash-errors-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}
.sp-dash-errors-table th,
.sp-dash-errors-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
.sp-dash-errors-table th {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  background: var(--bg2);
  position: sticky;
  top: 0;
}
.sp-dash-errors-table code {
  font-family: var(--eci-font-family-mono, ui-monospace, monospace);
  font-size: .85em;
}
.sp-dash-errors-table button.linkish {
  background: none;
  border: none;
  padding: 0;
  color: var(--link, #60a5fa);
  cursor: pointer;
  font: inherit;
}
.sp-dash-errors-table button.linkish:hover {
  text-decoration: underline;
}
.sp-dash-errors-empty {
  padding: 24px 8px;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}
.sp-dash-stat-label {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.sp-dash-stat-value {
  font-size: 1.35rem;
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  line-height: 1.2;
}
.sp-dash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1100px) {
  .sp-dash-grid { grid-template-columns: 1fr; }
}
.sp-dash-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 14px 16px 10px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}
.sp-dash-card.wide {
  grid-column: 1 / -1;
  min-height: 340px;
}
.sp-dash-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.sp-dash-card-head h3 {
  margin: 0;
}
.sp-dash-skew-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.sp-dash-skew-sep {
  width: 1px;
  height: 18px;
  background: var(--border-subtle);
  margin: 0 2px;
}
.sp-dash-skew-btn {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  padding: 6px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.sp-dash-skew-btn:hover {
  color: var(--text-primary);
  border-color: var(--border);
  background: var(--surface);
}
.sp-dash-skew-btn.is-active,
.sp-dash-skew-btn[aria-pressed="true"] {
  color: var(--text-primary);
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.12);
}
.sp-dash-card h3 {
  margin: 0 0 4px;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}
.sp-dash-expand {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: -4px -6px 0 0;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.sp-dash-expand:hover {
  color: var(--text-primary);
  border-color: var(--border);
  background: var(--surface);
}
.sp-dash-card .sp-dash-hint {
  margin: 0 0 6px;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}
.sp-dash-limit-note {
  margin: 0 0 8px;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}
.sp-dash-chart-wrap {
  position: relative;
  flex: 1;
  min-height: 220px;
}
.sp-dash-card.wide .sp-dash-chart-wrap {
  min-height: 280px;
}
.sp-dash-chart-wrap--modal {
  flex: none;
  min-height: 320px;
  width: 100%;
}
.sp-dash-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}
