/* Device / Connection workspace pages. */

/* ============================================================
   Workspace header — two-row enterprise toolbar (approved layout)
   ============================================================ */

/* Bleed header flush to the top of the workspace content */
.app.is-workspace .main:has(> .ws-header),
.app.is-workspace #view-outlet:has(> .ws-header) {
  padding: 0 0 24px !important;
}
.app.is-workspace .main:has(> .ws-header) > #ws-content,
.app.is-workspace #view-outlet:has(> .ws-header) > #ws-content {
  /* Same horizontal inset as toolbar — Status strip / cards share the edge */
  padding: 2px 24px 0;
  min-width: 0;
  box-sizing: border-box;
}

.ws-header {
  width: 100%;
  min-width: 0;
  padding-top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
  box-sizing: border-box;
  /* Match #ws-content horizontal padding so header aligns with Status cards */
  --ws-toolbar-pad-x: 24px;
  --ws-back-size: 32px;
  --ws-back-gap: 10px;
  --ws-name-inset: calc(var(--ws-toolbar-pad-x) + var(--ws-back-size) + var(--ws-back-gap));
}

/* Row 1 — identity + operational actions */
.ws-header .ws-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 var(--ws-toolbar-pad-x);
  gap: 12px;
  border-bottom: 1px solid var(--border-soft);
  box-sizing: border-box;
  flex-wrap: nowrap;
}

.ws-toolbar__identity {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  flex: 0 1 auto;
  white-space: nowrap;
  height: 32px;
}

.ws-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0 10px 0 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.14s, background 0.14s, border-color 0.14s;
}
.ws-back .icon {
  width: 14px;
  height: 14px;
  color: var(--icon-secondary);
  transition: color 0.14s;
}
.ws-back:hover {
  background: var(--hover);
  color: var(--text);
  border-color: var(--border-strong);
}
.ws-back:hover .icon { color: var(--icon); }
.ws-back:focus { outline: none; }
.ws-back:focus-visible {
  box-shadow: var(--focus-ring);
  color: var(--text);
}

.ws-idcopy {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 1.2;
  transition: color 0.14s;
  box-shadow: none;
}
.ws-idcopy:focus { outline: none; box-shadow: none; }
.ws-idcopy:focus-visible {
  outline: none;
  box-shadow: none;
  border-radius: 0;
}
.ws-idcopy--name {
  font-size: var(--fs-16);
  font-weight: 600;
  line-height: 22px;
  letter-spacing: -0.01em;
  color: var(--text);
  max-width: min(320px, 26vw);
  overflow: hidden;
}
.ws-idcopy--name .ws-idcopy__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-idcopy--name:hover {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}
.ws-idcopy--id {
  font-size: var(--fs-12);
  font-weight: 500;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.ws-idcopy--id:hover {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}
/* Brief confirmation: tint the copied label blue — no extra text overlay */
.ws-idcopy__text { transition: color 0.15s ease; }
.ws-idcopy.is-copied,
.ws-idcopy.is-copied:hover {
  color: var(--blue);
  text-decoration: none;
}
.ws-idcopy.is-copied .ws-idcopy__text { color: var(--blue); }

.ws-toolbar__vsep {
  flex: none;
  width: 1px;
  background: var(--border);
  align-self: center;
}
.ws-toolbar__vsep--id {
  height: 18px;
  margin: 0 10px;
}
.ws-toolbar__vsep--actions {
  height: 22px;
  margin: 0 10px;
}

.ws-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  flex: none;
  min-width: 0;
}
.ws-online__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neutral);
  flex: none;
}
.ws-online__label {
  font-size: var(--fs-13);
  font-weight: 500;
  line-height: 20px;
  color: var(--text-secondary);
}
.ws-online--ok .ws-online__dot { background: var(--ok); }
.ws-online--warn .ws-online__dot { background: var(--warn); }
.ws-online--danger .ws-online__dot { background: var(--danger); }
.ws-online--neutral .ws-online__dot { background: var(--neutral); }
/* Status label stays secondary; only the dot carries semantic color (approved) */

.ws-toolbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  flex: none;
  flex-shrink: 0;
  min-width: 0;
}
.ws-toolbar__proxy-acts,
.ws-toolbar__device-acts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

/* Toolbar actions — shared shell so Start isn't a loud outlier */
.ws-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-13);
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  transition:
    background 0.12s ease,
    color 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    transform 0.12s ease;
}
.ws-action__inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.ws-action__inner > span {
  line-height: 18px;
  letter-spacing: -0.01em;
}
.ws-action .icon {
  display: block;
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--icon-secondary);
  transition: color 0.12s ease;
}
.ws-action:hover:not(:disabled) {
  background: var(--hover);
  color: var(--text);
  border-color: var(--border-strong);
}
.ws-action:hover:not(:disabled) .icon { color: var(--icon); }
.ws-action:focus { outline: none; }
.ws-action:focus-visible { box-shadow: var(--focus-ring); }

/* Press → immediate light-blue ack (dashboard pattern, no toast) */
.ws-action.is-pressed:not(:disabled) {
  transform: translateY(1px) scale(0.97);
  background: var(--blue-soft);
  border-color: var(--blue-border);
  box-shadow: none;
  transition-duration: 0.06s;
}
.ws-action.is-busy:not(:disabled) {
  cursor: default;
  opacity: 0.85;
}
.ws-action.is-accepted:not(:disabled) {
  background: var(--blue-soft);
  border-color: var(--blue-border);
  color: var(--blue);
  cursor: default;
}
.ws-action.is-failed:not(:disabled) {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.35);
  color: var(--danger);
  cursor: default;
}
.ws-action.is-done:not(:disabled) {
  background: var(--blue-soft);
  border-color: var(--blue-border);
  color: var(--blue);
  box-shadow: none;
  transform: none;
  animation: ws-action-ack 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ws-action.is-done:not(:disabled) .icon {
  color: var(--blue);
}
.ws-action--primary.is-done:not(:disabled) {
  background: var(--blue-soft-2);
  border-color: var(--blue);
  color: var(--blue);
}
.ws-action--primary.is-done:not(:disabled) .icon { color: var(--blue); }

@keyframes ws-action-ack {
  0%   { transform: scale(0.97); background: var(--blue-soft); }
  55%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .ws-action.is-done:not(:disabled) { animation: none; }
  .ws-action.is-pressed:not(:disabled) { transform: none; }
}

/* Stable Start/Stop slot — prevents neighbor shift */
.ws-action--proxy-slot {
  min-width: 118px;
  padding-left: 12px;
  padding-right: 12px;
}

/* Start/Stop — accent sibling (soft blue), not a solid billboard */
.ws-action--primary:not(:disabled) {
  background: var(--blue-soft);
  border-color: var(--blue-border);
  color: var(--blue);
  font-weight: 600;
  box-shadow: none;
}
.ws-action--primary:not(:disabled) .icon { color: var(--blue); }
.ws-action--primary:not(:disabled):hover {
  background: var(--blue-soft-2);
  border-color: var(--blue);
  color: var(--blue-hover);
}
.ws-action--primary:not(:disabled):hover .icon { color: var(--blue-hover); }
.ws-action--primary.is-pressed:not(:disabled) {
  background: var(--blue-soft-2);
  border-color: var(--blue);
  color: var(--blue-active);
  transform: translateY(1px) scale(0.97);
}
.ws-action--primary.is-pressed:not(:disabled) .icon { color: var(--blue-active); }

/* Stop Proxy — same soft accent slot */
.ws-action--primary.ws-action--stop:not(:disabled) {
  font-weight: 600;
}

.ws-action:disabled,
.ws-action--disabled {
  color: var(--text-disabled);
  background: var(--surface-2);
  border-color: var(--border-soft);
  box-shadow: none;
  cursor: not-allowed;
}
.ws-action:disabled .icon,
.ws-action--disabled .icon {
  color: var(--icon-muted);
}
.ws-action:disabled:hover,
.ws-action--disabled:hover {
  background: var(--surface-2);
  color: var(--text-disabled);
  border-color: var(--border-soft);
}
.ws-action--primary:disabled,
.ws-action--primary.ws-action--disabled {
  background: var(--surface-2);
  border-color: var(--border-soft);
  color: var(--text-muted);
}

[data-theme="dark"] .ws-action {
  box-shadow: none;
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}
[data-theme="dark"] .ws-action:hover:not(:disabled) {
  background: var(--hover);
  color: var(--text);
}
[data-theme="dark"] .ws-action--primary:not(:disabled) {
  background: var(--blue-soft);
  border-color: var(--blue-border);
  color: var(--blue);
}

/* Row 2 — workspace navigation tabs */
.ws-header .ws-tabs {
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 48px;
  /* Left edge of Overview = left edge of device name */
  padding-left: var(--ws-name-inset);
  padding-right: var(--ws-toolbar-pad-x);
  padding-block: 0;
  gap: 24px;
  margin: 0;
  border-bottom: none;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  box-sizing: border-box;
}
.ws-header .ws-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0;
  margin: 0;
  border: none;
  border-bottom: none;
  background: transparent;
  font-size: var(--fs-14);
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.005em;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.14s ease;
  flex: none;
}
.ws-header .ws-tab:hover { color: var(--text); }
.ws-header .ws-tab.is-active {
  color: var(--blue);
  font-weight: 600;
  background: transparent;
}
.ws-header .ws-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 0;
  background: var(--blue);
}
.ws-header .ws-tab__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: inherit;
}
.ws-header .ws-tab__icon .icon {
  width: 16px;
  height: 16px;
  display: block;
}
.ws-header .ws-tab__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 7px;
  min-width: 20px;
  height: 20px;
  max-height: 20px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: var(--fs-12);
  font-weight: 600;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
}
.ws-header .ws-tab.is-active .ws-tab__badge {
  background: var(--blue-soft-2);
  color: var(--blue);
}

/* Settings / other pages — base tab strip (Workspace overrides via .ws-header) */
.ws-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border-soft);
  margin-top: 0;
  margin-bottom: 14px;
  overflow-x: auto;
}
.ws-tab {
  padding: 7px 10px;
  border: none;
  background: transparent;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.14s;
  cursor: pointer;
}
.ws-tab:hover { color: var(--text-secondary); }
.ws-tab.is-active {
  color: var(--blue);
  font-weight: 700;
  border-bottom-color: var(--blue);
}
.ws-tab__badge {
  margin-left: 5px;
  font-size: var(--fs-11);
  color: var(--text-muted);
  font-weight: 600;
}

/* Connection Workspace — legacy header layout */
.workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.workspace-head__main { min-width: 0; }
.workspace-head__title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: var(--fs-20);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.workspace-head__meta {
  margin-top: 4px;
  font-size: var(--fs-13);
  color: var(--text-muted);
  font-weight: 600;
}
.workspace-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.ws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.ws-section { margin-bottom: 18px; }
.ws-section h3 {
  font-size: var(--fs-13);
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.perm-list { display: flex; flex-direction: column; gap: 6px; }
.perm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: var(--fs-13);
  font-weight: 600;
}

.timeline-strip {
  display: flex;
  gap: 2px;
  height: 24px;
}
.timeline-strip__block {
  flex: 1;
  border-radius: 2px;
  min-width: 4px;
}
.timeline-strip__block--online { background: var(--ok); }
.timeline-strip__block--warning { background: var(--warn); }
.timeline-strip__block--offline { background: var(--neutral-block); }

.diagnostics {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.diagnostics__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: none;
  background: var(--surface-2);
  font-size: var(--fs-13);
  font-weight: 700;
  color: var(--text-secondary);
}
.diagnostics__toggle .icon { width: 16px; height: 16px; }
.diagnostics__body { padding: 16px; display: none; }
.diagnostics.is-open .diagnostics__body { display: block; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.metric-tile {
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.metric-tile__label { font-size: var(--fs-11); color: var(--text-muted); font-weight: 600; }
.metric-tile__value { font-size: var(--fs-16); font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -0.015em; }

.component-health { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.component-health__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: var(--fs-13);
  font-weight: 600;
}

.ip-history-table { width: 100%; border-collapse: collapse; font-size: var(--fs-13); }
.ip-history-table th, .ip-history-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
}
.ip-history-table th { font-size: var(--fs-11); text-transform: uppercase; color: var(--text-muted); font-weight: 600; letter-spacing: 0.04em; }

.endpoint-list { display: flex; flex-direction: column; gap: 8px; }
.endpoint-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: var(--fs-12);
}

.chart-wrap { height: 180px; margin: 12px 0; }
.chart-period { display: flex; gap: 6px; margin-bottom: 8px; }
.chart-period button {
  height: 28px; padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: var(--fs-12);
  font-weight: 700;
  color: var(--text-secondary);
}
.chart-period button.is-active { background: var(--blue-soft); color: var(--blue); border-color: var(--blue-border-soft); }

/* Terminal-style log viewer ? inverse (dark) surface in both themes */
.log-viewer {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--inverse-surface);
  color: var(--inverse-text-soft);
  font-family: var(--mono);
  font-size: var(--fs-12);
  max-height: 320px;
  overflow-y: auto;
}
.log-viewer__toolbar {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  background: var(--inverse-surface-2);
  border-bottom: 1px solid var(--inverse-border);
  flex-wrap: wrap;
}
.log-viewer__toolbar select, .log-viewer__toolbar input {
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--inverse-border-strong);
  border-radius: 4px;
  background: var(--inverse-surface);
  color: var(--inverse-text-soft);
  font-size: var(--fs-12);
}
.log-viewer__line { padding: 3px 10px; border-bottom: 1px solid var(--inverse-border); }
.log-viewer__line--warn { color: var(--inverse-warn); }
.log-viewer__line--error { color: var(--inverse-danger); }
.log-viewer__ts { color: var(--inverse-text-muted); margin-right: 8px; }

.uptime-grid { display: flex; flex-direction: column; gap: 4px; }
.uptime-grid__day { display: flex; gap: 2px; }
.uptime-grid__block {
  width: 10px; height: 18px;
  border-radius: 2px;
  flex: none;
}
.uptime-grid__block--up { background: var(--ok); }
.uptime-grid__block--degraded { background: var(--warn); }
.uptime-grid__block--down { background: var(--neutral-block); }

.embedded-table { margin-top: 8px; }

@media (max-width: 1280px) {
  .ws-grid { grid-template-columns: 1fr; }
}

/* Workspace header — progressive compaction (no broken wrap) */
@media (max-width: 1439px) {
  .ws-header .ws-toolbar {
    gap: 16px;
  }
  .ws-header .ws-tabs {
    gap: 28px;
  }
  .ws-idcopy--name { max-width: min(280px, 22vw); }
}

@media (max-width: 1099px) {
  .ws-header {
    --ws-toolbar-pad-x: 16px;
  }
  .ws-header .ws-toolbar {
    gap: 12px;
  }
  .ws-header .ws-tabs {
    gap: 20px;
  }
  .app.is-workspace .main:has(> .ws-header) > #ws-content {
    padding-left: 16px;
    padding-right: 16px;
  }
  .ws-idcopy--name { max-width: min(220px, 18vw); }
  .ws-action--proxy-slot { min-width: 110px; }
}

@media (max-width: 980px) {
  .ws-idcopy--id,
  .ws-toolbar__vsep--id { display: none; }
  .ws-online { margin-left: 14px; }
}

@media (max-width: 860px) {
  .ws-online { display: none; }
  .ws-idcopy--name { max-width: min(200px, 30vw); }
}

@media (max-width: 720px) {
  .workspace-head__actions {
    width: 100%;
  }
  .workspace-head__actions .btn {
    flex: 1 1 calc(50% - 4px);
    justify-content: center;
    min-width: 0;
  }
  .workspace-head__title {
    font-size: var(--fs-18);
  }
  /* Hide device actions first; keep proxy ops usable */
  .ws-toolbar__vsep--actions,
  .ws-toolbar__device-acts { display: none; }
  .ws-back { margin-right: 12px; }
}

/* ============================================================
   Workspace > Proxy & Ports — page identity (heading + section nav)
   ============================================================ */
.pp-page {
  --pp-gap: clamp(8px, 1vw, 14px);
  container-type: inline-size;
  container-name: pp-page;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* One parent grid: left operational stack + Global policy (content-driven height). */
.pp-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 475px);
  column-gap: 32px;
  align-items: start;
  min-width: 0;
}
.pp-top__main {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  align-self: start;
}
.pp-top__end {
  display: flex;
  flex-direction: row;
  align-items: start;
  gap: 12px;
  min-width: 0;
  padding-top: 0;
  box-sizing: border-box;
  align-self: start;
}
.pp-tlogs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: none;
  align-self: center;
  height: 36px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--blue) 28%, var(--border));
  border-radius: 8px;
  background: var(--surface);
  color: var(--blue);
  font: inherit;
  font-size: var(--fs-13);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.pp-tlogs-btn .icon {
  width: 15px;
  height: 15px;
  flex: none;
}
.pp-tlogs-btn:hover {
  background: var(--blue-soft);
  border-color: color-mix(in srgb, var(--blue) 45%, var(--border));
}
.pp-tlogs-btn:focus { outline: none; }
.pp-tlogs-btn:focus-visible {
  box-shadow: var(--focus-ring);
}
.pp-top__end .pp-global {
  padding-top: 0;
  width: 100%;
  max-width: none;
  min-width: 0;
  height: auto;
}
.pp-top:has(.pp-global[hidden]),
.pp-top--solo {
  grid-template-columns: minmax(0, 1fr);
}
.pp-top:has(.pp-global[hidden]) .pp-top__end,
.pp-top--solo .pp-top__end {
  display: none;
}
.pp-top:has(.pp-global[hidden]) .pp-top__end .pp-global,
.pp-top--solo .pp-top__end .pp-global {
  display: none !important;
  min-width: 0;
  width: 0;
  max-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.pp-head {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.pp-head__titles {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  /* Title + meta only: align with workspace tab “Overview” (after back button) */
  padding-left: calc(32px + 10px);
  /* Breath below main tabs divider — only above title + summary */
  padding-top: 16px;
}

.pp-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 28px;
  color: var(--text);
}
.pp-head__meta {
  margin: 0;
  font-size: var(--fs-13);
  font-weight: 500;
  line-height: 20px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Ports / OpenVPN / WireGuard / IP Change — icon + label underline tabs */
.pp-section-nav {
  display: inline-flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 2px;
  height: 40px;
  margin: 12px 0 0;
  padding: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  overflow: visible;
  width: fit-content;
  max-width: 100%;
}
.pp-section-nav__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: none;
  height: 100%;
  margin: 0;
  padding: 0 16px;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: var(--fs-13);
  font-weight: 500;
  line-height: 20px;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.12s ease;
}
.pp-section-nav__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: inherit;
}
.pp-section-nav__ico .icon {
  width: 16px;
  height: 16px;
  display: block;
}
.pp-section-nav__label {
  display: inline-block;
}
.pp-section-nav__btn:hover { color: var(--text); }
.pp-section-nav__btn:focus-visible {
  outline: none;
  z-index: 1;
  box-shadow: inset 0 0 0 2px var(--blue-border);
  border-radius: 6px;
}
.pp-section-nav__btn.is-active {
  background: transparent;
  color: var(--blue);
  font-weight: 600;
}
.pp-section-nav__btn.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--blue);
}

.pp-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-top: 24px;
}
.pp-toolbar__cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
}
.pp-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-width: 0;
}
.pp-sort__label {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.pp-sort__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-12);
  font-weight: 600;
  line-height: 26px;
  cursor: pointer;
  max-width: 200px;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.pp-sort__btn .icon {
  width: 12px;
  height: 12px;
  color: var(--icon-secondary);
  flex: none;
}
.pp-sort__current {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.pp-sort__btn:hover {
  background: var(--hover);
  border-color: var(--border-strong);
}
.pp-sort__btn:focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

/* ---- Inline create composer ---- */
.pp-composer {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 18px 0 8px;
  width: 100%;
  max-width: none;
}
.pp-composer[hidden] { display: none !important; }
.pp-composer__title {
  font-size: var(--fs-13);
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
.pp-composer__form { display: flex; flex-direction: column; gap: 12px; }
.pp-composer__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
  max-width: 1320px;
}

/* ---- Two-card port editor (Access & Identity | Port policies) ---- */
.pp-editor-shell {
  container-type: inline-size;
  container-name: pp-ed;
  width: 100%;
}
.pp-editor-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: start;
}
.pp-editor-col {
  min-width: 0;
  width: 100%;
}
.pp-editor-col--left,
.pp-editor-col--right {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pp-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  height: fit-content;
}
.pp-card__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pp-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.pp-card__desc {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.45;
}
.pp-card--policies {
  gap: 10px;
}
.pp-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.pp-card__actions-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.pp-card__actions-right--alone {
  width: 100%;
  justify-content: flex-end;
  margin-left: 0;
}
.pp-card__actions .pp-danger {
  padding-left: 6px;
  padding-right: 6px;
}
.pp-card__actions [data-saved] {
  color: var(--ok-text, #16a34a);
}

/* Accordion policy sections */
.pp-acc {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  overflow: hidden;
}
.pp-acc + .pp-acc { margin-top: 0; }
.pp-acc__head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.pp-acc__head:hover { background: var(--hover); }
.pp-acc__head:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--blue-border-soft);
}
.pp-acc__head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.pp-acc__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.pp-acc__summary {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-acc__chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  color: var(--icon-secondary);
}
.pp-acc__chev .icon { width: 16px; height: 16px; }
.pp-acc__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 12px 14px;
  border-top: 1px solid var(--border-soft);
  padding-top: 14px;
}

/* Port policy inheritance UI */
.pp-card__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pp-overrides-count {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.pp-acc__summary-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary, var(--text-secondary));
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-src {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.5;
  vertical-align: middle;
}
.pp-src--inherited {
  color: var(--blue, #2563eb);
  background: color-mix(in srgb, var(--blue, #2563eb) 12%, transparent);
}
.pp-src--override {
  color: var(--blue, #2563eb);
  background: color-mix(in srgb, var(--blue, #2563eb) 18%, transparent);
}
.pp-src--default {
  color: var(--text-secondary);
  background: var(--surface-3, var(--hover));
}
.pp-pol-sec {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.pp-pol-sec + .pp-pol-sec { margin-top: 2px; }
.pp-pol-sec__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pp-pol-sec__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.pp-pol-banner {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}
.pp-pol-acts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-top: 2px;
}
.pp-pol-note {
  margin: 0;
  width: 100%;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-secondary);
  text-align: left;
}
.pp-pol-alloc {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border-soft, var(--border));
}
.pp-pol-alloc__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.pp-pol-alloc__line,
.pp-pol-alloc__pool,
.pp-pol-alloc-note {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-secondary);
}
.pp-pol-alloc__pool {
  margin-top: 2px;
  color: var(--text);
  font-weight: 550;
}
.pp-pol-alloc-note {
  margin-top: 10px;
}
.pp-ro {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pp-ro__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}
.pp-ro__value {
  font-size: 13px;
  font-weight: 550;
  color: var(--text);
}
.pp-dest-preview {
  list-style: none;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  max-height: 160px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pp-dest-preview__item {
  font-size: 12px;
  color: var(--text);
}
.pp-atlimit__radios {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pp-atlimit__radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
}
.pp-atlimit__radio:hover { background: var(--hover); }
.pp-atlimit__radio.is-active {
  border-color: var(--blue-border-soft, var(--blue));
  background: color-mix(in srgb, var(--blue, #2563eb) 8%, transparent);
}
.pp-atlimit__radio input { margin: 0; }
.pp-help--ipver { margin-top: 6px; }

/* Bulk destination editor */
.pp-bulk__ta {
  width: 100%;
  min-height: 160px;
  max-height: 220px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
  overflow-y: auto;
}
.pp-bulk__ta:hover:not(:disabled):not(:focus) {
  border-color: var(--border-strong);
}
.pp-bulk__ta:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.pp-bulk__ta::placeholder {
  color: var(--input-placeholder, var(--text-muted));
  opacity: 1;
}
.pp-bulk__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pp-bulk__count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.pp-bulk__feedback {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}
.pp-bulk__errors {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 72px;
  overflow-y: auto;
}
.pp-bulk__err {
  font-size: 11px;
  font-weight: 500;
  color: var(--danger-text);
}
.pp-bulk__err code {
  font-size: 11px;
  font-weight: 600;
  margin-right: 6px;
  color: var(--text);
}
.pp-help--examples {
  opacity: 0.9;
}
.pp-field--narrow {
  max-width: 220px;
}
.pp-link-btn {
  padding: 0;
  border: none;
  background: none;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.pp-link-btn:hover { text-decoration: underline; }

/* Input and unit. The 16px first column of the old layout held a
   direction arrow (.pp-bw-dir) that no longer exists: the input landed
   in it, 16px wide, with the unit glued to its spinner. */
.pp-bw-field {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 180px;
}
.pp-bw-field .pp-input--bw { width: 96px; flex: none; }
.pp-bw-dir {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}
.pp-input--bw,
.pp-input--usage {
  height: 34px;
  min-width: 0;
}
.pp-suffix {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  flex: none;
  padding-right: 2px;
}

.pp-usage-amount {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 180px;
}
.pp-input--usage { width: 72px; flex: none; }

.pp-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--icon-secondary) 50%),
    linear-gradient(135deg, var(--icon-secondary) 50%, transparent 50%);
  background-position: calc(100% - 12px) calc(50% - 2px), calc(100% - 7px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 24px;
  height: 34px;
}
.pp-select--unit { width: 72px; flex: none; }

/* ---- Destination tag field ---- */
.pp-tag-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pp-tag-field__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
  max-height: 120px;
  overflow-y: auto;
  padding: 2px 0;
}
.pp-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  height: 26px;
  padding: 0 4px 0 9px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}
.pp-tag-chip__text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
.pp-tag-chip__x {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  flex: none;
}
.pp-tag-chip__x:hover {
  background: var(--danger-soft);
  color: var(--danger-text);
}
.pp-tag-field__compose {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}
.pp-tag-field__compose:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.pp-tag-field__compose .pp-tag-field__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 34px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.pp-tag-field__compose .pp-tag-field__input:focus {
  box-shadow: none;
  border: none;
}
.pp-tag-field__compose .btn {
  flex: none;
  margin: 3px;
  height: 28px;
  border-radius: var(--radius-sm);
}

.pp-policy-icos {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
}
.pp-policy-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--icon-secondary);
}
.pp-policy-ico .icon { width: 13px; height: 13px; }

.pp-expiry-dt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}
.pp-expiry-note {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}

@container pp-ed (min-width: 900px) {
  .pp-editor-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.44fr) minmax(320px, 0.56fr);
    gap: 18px;
    align-items: start;
  }
  .pp-editor-col--left,
  .pp-editor-col--right {
    width: auto;
  }
}

@container pp-ed (max-width: 560px) {
  .pp-grid-2,
  .pp-grid-2--usage,
  .pp-expiry-dt {
    grid-template-columns: 1fr;
  }
  .pp-grid-2--proto {
    flex-direction: column;
    gap: 12px;
  }
  .pp-grid-2--proto .pp-field--proto {
    width: 100%;
  }
  .pp-segment--wrap {
    width: 100%;
  }
}

.pp-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.pp-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.005em;
}
.pp-help {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
}
.pp-help--inline { margin-top: 4px; }
.pp-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
/* Protocol / Access / IP version — compact left-aligned chips, no stretch. */
.pp-grid-2--proto {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
  justify-content: flex-start;
}
.pp-grid-2--proto .pp-field--proto {
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
}
.pp-label--with-tip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pp-grid-2--usage {
  align-items: start;
}
.pp-input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg, var(--surface));
  color: var(--text);
  font-size: var(--fs-13);
  font-weight: 500;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}
.pp-input::placeholder {
  color: var(--input-placeholder, var(--text-muted));
  font-weight: 500;
  opacity: 1;
}
.pp-input:hover:not(:disabled):not(:focus) {
  border-color: var(--border-strong);
}
.pp-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
  outline: none;
  background: var(--surface);
}
.pp-input:disabled {
  color: var(--text-disabled);
  background: var(--surface-2);
  border-color: var(--border-soft);
  cursor: not-allowed;
}
.pp-input-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}
.pp-input-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.pp-input-wrap .pp-input {
  flex: 1;
  min-width: 0;
  border: none;
  box-shadow: none;
  border-radius: 0;
  background: transparent;
}
.pp-input-wrap .pp-input:focus {
  border: none;
  box-shadow: none;
}
.pp-input-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 2px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--icon-secondary);
  flex: none;
  cursor: pointer;
}
.pp-input-act:hover { background: var(--hover); color: var(--text); }
.pp-input-act:focus-visible { box-shadow: var(--focus-ring); }
.pp-input-act .icon { width: 14px; height: 14px; }
.pp-input-act.is-generated {
  color: var(--ok-text, #16a34a);
}

.pp-segment {
  display: inline-flex;
  flex-wrap: nowrap;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  width: fit-content;
  max-width: 100%;
}
.pp-segment--fit { width: fit-content; }
.pp-segment--wrap {
  flex-wrap: wrap;
  width: auto;
  max-width: 100%;
}
.pp-segment:not(.pp-segment--fit) { width: auto; }
.pp-segment__btn {
  height: 32px;
  padding: 0 12px;
  border: none;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--fs-12);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.pp-segment__btn:last-child { border-right: none; }
.pp-segment__btn:hover { background: var(--hover); color: var(--text); }
.pp-segment__btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--blue-border-soft);
  z-index: 1;
}
.pp-segment__btn.is-active {
  background: var(--blue-soft);
  color: var(--blue);
}

.pp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pp-chip {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: var(--fs-12);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.pp-chip:hover { background: var(--hover); color: var(--text); }
.pp-chip:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.pp-chip.is-active {
  background: var(--blue-soft);
  border-color: var(--blue-border-soft);
  color: var(--blue);
}
.pp-chip:disabled {
  color: var(--text-disabled);
  border-color: var(--border-soft);
  background: var(--surface-2);
  cursor: not-allowed;
}
.pp-input--date,
.pp-input--time { width: 100%; max-width: 100%; }
.pp-ip-add {
  display: flex;
  gap: 6px;
  align-items: center;
  max-width: 420px;
}
.pp-ip-add .pp-input { flex: 1; min-width: 0; }
.pp-ip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.pp-ip-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 8px 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono, ui-monospace, monospace);
}
.pp-ip-chip__x {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.pp-ip-chip__x:hover { color: var(--danger-text); }
.pp-code {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  font-size: 12px;
  word-break: break-all;
}
.pp-success {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 12px 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--ok-soft, rgba(16, 185, 129, 0.12));
  border: 1px solid var(--ok-border, rgba(16, 185, 129, 0.3));
  font-size: 13px;
}
.pp-success__acts { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-qr { display: flex; justify-content: center; padding: 8px 0; }
.pp-error {
  margin: 0;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--danger-text);
}

/* ---- List / table ---- */
.pp-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  min-width: 0;
}
/* Columns: check, port, sessions, traffic, allowance, speed, expiration */
.pp-list__head {
  display: grid;
  grid-template-columns: 28px minmax(280px, 2fr) 110px 90px 150px 80px 196px;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.pp-col--sessions,
.pp-col--traffic,
.pp-col--speed,
.pp-col--exp { text-align: right; }

.pp-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.pp-bulk__count {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 4px;
  font-variant-numeric: tabular-nums;
}
.pp-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
}
.pp-check input { margin: 0; }

.pp-vpn__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.pp-vpn__title {
  margin: 0;
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--text);
}
.pp-vpn__list {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.pp-rows { display: flex; flex-direction: column; }

.pp-row {
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
  transition: background 0.15s;
}
.pp-row:last-child { border-bottom: none; }
.pp-row:hover {
  background: var(--hover);
}
.pp-row.is-new {
  background: var(--selected);
  transition: background 0.55s ease;
}
.pp-row--vpn.is-new {
  background: color-mix(in srgb, var(--ok-soft) 70%, var(--selected));
  box-shadow: inset 3px 0 0 var(--ok);
}
@supports not (background: color-mix(in srgb, white 50%, black)) {
  .pp-row--vpn.is-new { background: var(--selected); }
}
.pp-row.is-expanded {
  background: var(--surface);
}
.pp-row.is-expanded:hover {
  background: var(--surface);
}
.pp-row.is-selected {
  background: var(--selected);
}
.pp-row.is-selected:hover {
  background: color-mix(in srgb, var(--selected) 82%, var(--blue-soft));
}
@supports not (background: color-mix(in srgb, white 50%, black)) {
  .pp-row.is-selected:hover { background: var(--selected); }
}
.pp-row.is-selected.is-new { background: var(--selected); }

.pp-row__line {
  display: grid;
  grid-template-columns: 28px minmax(280px, 2fr) 110px 90px 150px 80px 196px;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  min-width: 0;
}
.pp-row__line--vpn .pp-row__proxyline {
  flex-wrap: nowrap;
}
.pp-row__line--vpn .pp-row__host {
  flex: 1 1 auto;
  margin-top: 0;
  font-size: var(--fs-11);
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.pp-status-text {
  font-weight: 600;
  color: var(--text-secondary);
}
.pp-status-text--ok { color: var(--ok-text); }
.pp-status-text--warn { color: var(--warn-text); }
.pp-status-text--danger { color: var(--danger-text); }
.pp-status-text--neutral { color: var(--neutral-text, var(--text-muted)); }
.pp-editor--vpn {
  max-width: 720px;
}
.pp-card--vpn {
  max-width: 720px;
}
.pp-vpn-pubkey {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pp-vpn-pubkey .pp-code {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 12px;
}

.pp-row__identity {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
/* Fixed text track + action column — buttons align left-of-center across rows */
.pp-row__identity--proxy {
  display: grid;
  grid-template-columns: 7px minmax(0, 360px) auto;
  column-gap: 8px;
  align-items: center;
  width: auto;
  max-width: 100%;
}
.pp-row__identity--proxy .pp-dot {
  align-self: flex-start;
  margin-top: 5px;
}
.pp-row__identity--proxy .pp-row__idtext {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.pp-row__identity--proxy .pp-row__actions {
  flex: none;
  justify-self: start;
  align-self: center;
  margin-left: 14px;
}
.pp-row__identity--proxy .pp-row__desc-text {
  max-width: 100%;
}
.pp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: var(--neutral);
  margin-top: 5px;
}
.pp-dot--ok { background: var(--ok); }
.pp-dot--warn { background: var(--warn); }
.pp-dot--danger { background: var(--danger); }
.pp-dot--neutral { background: var(--neutral); }

.pp-row__idtext { min-width: 0; flex: 1; }
.pp-row__proto {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  line-height: 1.2;
}
.pp-row__proto-name { flex: none; }
.pp-row__host {
  margin-top: 0;
  min-width: 0;
  flex: 1 1 auto;
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-row__portnum {
  flex: none;
  font-variant-numeric: tabular-nums;
}
.pp-sep {
  color: var(--text-disabled);
  font-weight: 500;
  flex: none;
  line-height: 1;
}
.pp-row__proxyline {
  display: flex;
  align-items: center;
  min-width: 0;
  width: auto;
  max-width: 100%;
  margin-top: 1px;
}
.pp-row__proxy {
  min-width: 0;
  max-width: 100%;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.pp-row__proxy--meta {
  font-family: inherit;
  font-weight: 600;
}
.pp-row__access-meta {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.pp-row__desc,
.pp-row__desc-text {
  margin-top: 1px;
  font-size: var(--fs-11);
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(520px, 48vw);
  line-height: 1.25;
}
.pp-row__actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.pp-ico-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--icon-secondary);
  cursor: pointer;
  flex: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.pp-ico-btn:hover {
  background: var(--hover);
  border-color: var(--border-strong);
  color: var(--icon);
}
.pp-ico-btn:active {
  background: var(--surface-2);
  color: var(--text);
}
.pp-ico-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.pp-ico-btn:disabled {
  color: var(--icon-muted);
  background: var(--surface-2);
  border-color: var(--border-soft);
  cursor: not-allowed;
}
.pp-ico-btn:disabled:hover {
  color: var(--icon-muted);
  background: var(--surface-2);
  border-color: var(--border-soft);
}
.pp-ico-btn .icon {
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.pp-ico-btn.is-copied {
  color: var(--blue);
  border-color: var(--blue-border);
  background: var(--blue-soft);
}
.pp-ico-btn--danger {
  color: var(--danger-text);
  border-color: var(--danger-border);
  background: color-mix(in srgb, var(--danger-soft) 55%, var(--surface-2));
}
@supports not (background: color-mix(in srgb, white 50%, black)) {
  .pp-ico-btn--danger { background: var(--surface-2); }
}
.pp-ico-btn--danger:hover {
  color: var(--danger-text);
  background: var(--danger-soft);
  border-color: var(--danger-border);
}
.pp-ico-btn--danger:active {
  color: var(--danger-text);
  background: var(--danger-soft-2);
  border-color: var(--danger-border);
}

/* Compact delete confirmation anchored to trash icon */
.pp-confirm-pop {
  min-width: 220px;
  max-width: 260px;
  padding: 12px;
}
.pp-confirm-pop__title {
  margin: 0;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text);
}
.pp-confirm-pop__msg {
  margin: 4px 0 0;
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}
.pp-confirm-pop__acts {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
}
.pp-confirm-pop__acts .btn--danger {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--text-on-danger);
}
.pp-confirm-pop__acts .btn--danger:hover {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
}

.pp-metric {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  text-align: right;
  justify-self: stretch;
}
.pp-metric__label {
  display: none; /* desktop: column headers carry the labels */
}
.pp-metric__value {
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pp-muted { color: var(--text-muted); font-weight: 500; }

/* Traffic allowance cell: the Free plan quota (.plan-free-quota) in one
   row height, meta above the bar. Same bands and colours. */
.pp-allow {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.pp-allow__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--fs-11);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pp-allow__lead { color: var(--text); }
.pp-allow__reset {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-allow__bar {
  height: 4px;
  border-radius: 999px;
  background: var(--border-soft);
  overflow: hidden;
}
.pp-allow__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}
.pp-allow[data-band="warning"] .pp-allow__fill { background: var(--warn); }
.pp-mcard__allow { margin: 0 12px 12px; }
.pp-exp {
  font-weight: 600;
  white-space: nowrap;
  user-select: all;
}
.pp-exp--warn { color: var(--warn-text); }
.pp-exp--danger { color: var(--danger-text); }

/* Compact second line ? hidden on wide layouts; spans full width when shown */
.pp-row__compact {
  display: none;
  grid-column: 1 / -1;
}

.pp-empty {
  padding: 16px 4px 24px;
  text-align: left;
  color: var(--text);
  font-size: var(--fs-13);
}
.pp-empty p { margin: 0 0 6px; }
.pp-empty p strong { font-weight: 650; color: var(--text); }
.pp-empty .btn { margin-top: 10px; }
.pp-empty__hint {
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0 0 8px;
  line-height: 1.4;
}

/* ---- Inline editor ---- */
.pp-row__editor {
  padding: 10px 12px 14px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg, var(--surface-2));
}
.pp-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
  max-width: 1320px;
  width: 100%;
}
.pp-editor-anchor {
  scroll-margin-top: calc(var(--ws-sticky-offset, 64px) + 12px);
}
.pp-composer.pp-editor-anchor,
.pp-composer .pp-editor-anchor {
  scroll-margin-top: calc(var(--ws-sticky-offset, 64px) + 12px);
}
.pp-editor__nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.pp-editor__backlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 2px 4px 2px 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.3;
}
.pp-editor__backlink:hover {
  color: var(--text);
  background: transparent;
}
.pp-editor__backlink:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.pp-editor__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--icon-secondary);
  cursor: pointer;
}
.pp-editor__back:hover {
  background: var(--hover);
  color: var(--text);
}
.pp-editor__back .icon { width: 16px; height: 16px; }
.pp-vpn {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  min-width: 0;
}
.pp-vpn[hidden] { display: none !important; }

/* ---- IP Change URL ---- */
/* Even air above/below Add URL — only this section */
.pp-page:has(.pp-ipurl:not([hidden])) .pp-toolbar {
  margin-top: 12px;
}
.pp-page > .pp-ipurl {
  margin-top: 12px;
}
.pp-ipurl {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.pp-ipurl[hidden] { display: none !important; }
.pp-ipurl__loading {
  margin: 0;
  padding: 28px 16px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

/* ---- Traffic Logs export drawer ---- */
.drawer--tlogs .drawer__panel--tlogs {
  width: min(420px, 100vw);
  max-width: 100%;
}
.drawer__scroll--tlogs {
  display: flex;
  flex-direction: column;
  padding: 0;
}
.pp-tlogs-drawer__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.pp-tlogs-drawer__title-ico {
  display: inline-flex;
  color: var(--blue);
}
.pp-tlogs-drawer__title-ico .icon {
  width: 16px;
  height: 16px;
}
.pp-tlogs-drawer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 4px 4px 20px;
  min-height: 100%;
  box-sizing: border-box;
}
.pp-tlogs-drawer__fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pp-tlogs-drawer__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.pp-tlogs-drawer__label {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text-secondary);
}
.pp-tlogs-drawer__control {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
.pp-tlogs-drawer__ico {
  position: absolute;
  left: 12px;
  display: inline-flex;
  color: var(--icon-secondary);
  pointer-events: none;
  z-index: 1;
}
.pp-tlogs-drawer__ico .icon {
  width: 15px;
  height: 15px;
}
.pp-tlogs-drawer__select {
  width: 100%;
  height: 40px;
  margin: 0;
  padding: 0 36px 0 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-13);
  font-weight: 500;
  appearance: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.pp-tlogs-drawer__select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: var(--focus-ring);
}
.pp-tlogs-drawer__hint {
  margin: 0;
  font-size: var(--fs-11);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pp-tlogs-drawer__included {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface-2, var(--bg));
}
.pp-tlogs-drawer__included-title {
  margin: 0;
  font-size: var(--fs-12);
  font-weight: 700;
  color: var(--text);
}
.pp-tlogs-drawer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pp-tlogs-drawer__list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-13);
  color: var(--text-secondary);
}
.pp-tlogs-drawer__check {
  display: inline-flex;
  color: var(--blue);
  flex: none;
}
.pp-tlogs-drawer__check .icon {
  width: 14px;
  height: 14px;
}
.pp-tlogs-drawer__status {
  margin: 0;
  font-size: var(--fs-12);
  color: var(--text-muted);
}
.pp-tlogs-drawer__status--ok { color: var(--ok, #1a7f4b); }
.pp-tlogs-drawer__empty {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.pp-tlogs-drawer__empty p {
  margin: 0 0 4px;
  font-size: var(--fs-12);
}
.pp-tlogs-drawer__footer {
  margin-top: auto;
  padding-top: 8px;
}
.pp-tlogs-drawer__cta {
  width: 100%;
  justify-content: center;
  height: 42px;
}

.pp-editor__tlogs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.pp-editor__tlogs-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pp-editor__tlogs-label {
  font-size: var(--fs-11);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pp-editor__tlogs-value {
  font-size: var(--fs-13);
  font-weight: 600;
}
.pp-editor__tlogs-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent, var(--blue));
  font: inherit;
  font-size: var(--fs-13);
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}
.pp-editor__tlogs-link:hover { text-decoration: underline; }
.pp-editor__tlogs-link:focus-visible {
  outline: 2px solid var(--focus, var(--accent));
  outline-offset: 2px;
}
.pp-ipurl__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-width: 720px;
}
.pp-ipurl__hint {
  margin: 0 0 4px;
  font-size: var(--fs-13, 13px);
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.4;
}
.pp-ipurl-row {
  display: flex;
  align-items: flex-start;
  gap: 6px 8px;
  width: 100%;
  padding: 4px 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
}
.pp-ipurl-row.is-busy { opacity: 0.7; }
.pp-ipurl-row__num {
  flex: none;
  width: 18px;
  margin-top: 1px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
  line-height: 1.35;
}
.pp-ipurl-row__url {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--blue);
  text-decoration: none;
  white-space: normal;
  overflow: visible;
  word-break: break-all;
  cursor: pointer;
}
.pp-ipurl-row__exp {
  flex: none;
  font-size: 10.5px;
  line-height: 1.35;
  white-space: nowrap;
}
.pp-ipurl-row__url:hover {
  text-decoration: underline;
}
.pp-ipurl-row__url:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 2px;
}
.pp-ipurl-row__acts {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  flex: none;
  margin-top: -2px;
}
.pp-empty .btn { margin-top: 12px; }

/* ---- OpenVPN / WireGuard — identity + fixed action column ---- */
.pp-row__identity--vpn {
  /* Fixed text + action tracks: icons align across rows regardless of name/desc length */
  display: grid;
  grid-template-columns: 7px minmax(0, 200px) auto;
  column-gap: 8px;
  align-items: center;
  min-width: 0;
  width: auto;
  max-width: 100%;
}
.pp-row__identity--vpn .pp-dot {
  align-self: flex-start;
  margin-top: 6px;
}
.pp-row__identity--vpn .pp-row__idtext {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.pp-row__identity--vpn .pp-row__proto {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-row__identity--vpn .pp-row__desc-text {
  max-width: 100%;
}
.pp-row__desc-text--empty {
  min-height: 14px;
}
.pp-row__actions--vpn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  margin-left: 0;
  justify-self: start;
  align-self: center;
}

.pp-status-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pp-status-pill--ok {
  background: var(--ok-soft);
  color: var(--ok-text);
  border-color: var(--ok-border);
}
.pp-status-pill--warn {
  background: var(--warn-soft);
  color: var(--warn-text);
  border-color: var(--warn-border);
}
.pp-status-pill--danger {
  background: var(--danger-soft);
  color: var(--danger-text);
  border-color: var(--danger-border);
}
.pp-status-pill--neutral {
  background: var(--neutral-soft);
  color: var(--neutral-text, var(--text-secondary));
  border-color: var(--neutral-border, transparent);
}

.pp-row__line--vpn .pp-metric[data-m="sessions"],
.pp-row__line--vpn .pp-metric[data-m="traffic"],
.pp-row__line--vpn .pp-metric[data-m="allow"],
.pp-row__line--vpn .pp-metric[data-m="speed"],
.pp-row__line--vpn .pp-metric[data-m="exp"] {
  text-align: right;
  justify-self: stretch;
  min-width: 0;
  overflow: hidden;
}

/*
  VPN rows: checkbox + identity + sessions + traffic + allowance + speed +
  expiration, the proxy row's columns.
*/
.pp-list__head--vpn,
.pp-row__line--vpn,
.pp-list__head--vpn.pp-list__head--wg,
.pp-row__line--vpn.pp-row__line--wg {
  grid-template-columns: 28px minmax(0, 1fr) 96px 80px 150px 80px 200px;
  gap: 8px;
  padding: 9px 12px;
  align-items: center;
}
.pp-list__head--vpn {
  background: var(--surface-2);
  color: var(--text-secondary);
}
.pp-list__head--vpn .pp-col:nth-child(2) {
  text-align: left;
}
.pp-list__head--vpn .pp-col:nth-child(n + 3) {
  text-align: right;
}
.pp-row--vpn.is-expanded {
  background: var(--surface);
}
.pp-row__editor--vpn {
  padding: 14px 14px 18px;
  background: var(--bg);
  border-top: 1px solid var(--border-soft);
}

.pp-editor--vpn {
  max-width: none;
  width: 100%;
  gap: 12px;
  padding-top: 0;
}
.pp-composer .pp-editor--vpn {
  max-width: none;
}

.pp-vpn-ed {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.pp-vpn-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
  padding: 22px 22px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-sizing: border-box;
}
.pp-vpn-card--settings {
  padding: 0;
  overflow: hidden;
}
.pp-vpn-card__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 22px;
}
.pp-vpn-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
}
.pp-vpn-card__desc {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}
.pp-vpn-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  min-width: 0;
}
.pp-vpn-fields__row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 14px 16px;
  min-width: 0;
}
.pp-vpn-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
.pp-vpn-card__actions-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.pp-vpn-card__headbtn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border: none;
  border-bottom: 1px solid var(--border-soft);
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.pp-vpn-card__headbtn:hover { background: var(--hover); }
.pp-vpn-card--settings.is-collapsed .pp-vpn-card__headbtn {
  border-bottom: none;
}
.pp-vpn-card__head-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.pp-vpn-card__head-ico {
  width: 16px;
  height: 16px;
  color: var(--icon-secondary);
  flex: none;
}
.pp-vpn-card__head-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.pp-vpn-card__optional {
  font-weight: 500;
  color: var(--text-secondary);
}
.pp-vpn-card__chev {
  width: 16px;
  height: 16px;
  color: var(--icon-secondary);
  flex: none;
}
.pp-vpn-card__body {
  display: flex;
  flex-direction: column;
  padding: 4px 0 0;
  flex: 1;
}
.pp-vpn-setrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  min-width: 0;
}
.pp-vpn-setrow__copy {
  min-width: 0;
  flex: 1;
}
.pp-vpn-setrow__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.pp-vpn-setrow__help {
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.35;
}
.pp-vpn-info {
  display: inline-flex;
  color: var(--icon-muted);
  cursor: help;
}
.pp-vpn-info .icon {
  width: 13px;
  height: 13px;
}
.pp-vpn-select {
  width: auto;
  min-width: 118px;
  max-width: 140px;
  height: 32px;
  flex: none;
  padding: 0 28px 0 10px;
}
.pp-vpn-switch { flex: none; }
.pp-vpn-setblock {
  padding: 14px 18px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.pp-vpn-ta-wrap {
  position: relative;
  margin-top: 10px;
}
.pp-vpn-ta {
  width: 100%;
  min-height: 110px;
  max-height: 180px;
  resize: vertical;
  padding: 10px 12px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg, var(--surface-2));
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  box-sizing: border-box;
}
.pp-vpn-ta::placeholder {
  color: var(--input-placeholder, var(--text-muted));
  opacity: 1;
}
.pp-vpn-ta:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
  background: var(--surface);
}
.pp-vpn-ta__count {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.pp-vpn-advanced {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  border: none;
  border-top: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  margin-top: auto;
}
.pp-vpn-advanced:hover { background: var(--hover); }
.pp-vpn-advanced .icon {
  width: 15px;
  height: 15px;
  color: var(--icon-secondary);
}
.pp-vpn-advanced__body {
  padding: 0 18px 16px;
}

.pp-vpn-card--main .pp-input {
  height: 36px;
  background: var(--input-bg, var(--surface-2));
}
.pp-vpn-card--main .pp-chip {
  height: 30px;
  padding: 0 11px;
  background: var(--surface-2);
}
.pp-vpn-card--main .pp-chip.is-active {
  background: var(--blue-soft);
  border-color: var(--blue-border);
  color: var(--blue);
}

@container pp-page (max-width: 1100px) {
  .pp-vpn-ed {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 14px;
  }
  .pp-list__head--vpn,
  .pp-row__line--vpn,
  .pp-list__head--vpn.pp-list__head--wg,
  .pp-row__line--vpn.pp-row__line--wg {
    grid-template-columns: 28px minmax(0, 1fr) 88px 72px 130px 72px 200px;
  }
}
@container pp-page (max-width: 860px) {
  .pp-vpn-ed {
    grid-template-columns: 1fr;
  }
  .pp-vpn-fields__row {
    grid-template-columns: 1fr;
  }
  .pp-row__identity--vpn {
    grid-template-columns: 7px minmax(0, 160px) auto;
    max-width: 100%;
  }
}
.pp-editor__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
  padding: 12px 0 2px;
  border-top: 1px solid var(--border-soft);
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: var(--bg, var(--surface-2));
}
.pp-editor__footer-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.pp-editor__footer--create {
  justify-content: flex-end;
  border-top: 1px solid var(--border-soft);
}
.pp-danger {
  color: var(--danger-text) !important;
  border-color: transparent !important;
}
.pp-danger:hover {
  background: var(--danger-soft) !important;
  border-color: var(--danger-border) !important;
}
.pp-danger:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.pp-editor__footer .pp-danger {
  padding-left: 6px;
  padding-right: 6px;
}
.pp-composer .pp-editor {
  padding-top: 0;
  max-width: 1320px;
}

/* ---- Global policy compact summary (top-right) ---- */
.pp-global {
  display: block;
  min-width: 0;
  width: 100%;
  max-width: none;
  height: auto;
  padding-top: 0;
  box-sizing: border-box;
}
.pp-global[hidden] { display: none !important; }
.pp-gp-editor {
  min-width: 0;
  width: 100%;
}
.pp-gp-editor[hidden] { display: none !important; }

.pp-gp {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  box-shadow: none;
}
.pp-gp.is-disabled {
  background: var(--surface-2);
}
.pp-global > .pp-gp {
  flex: none;
  width: 100%;
  height: auto;
  min-height: 0;
  box-sizing: border-box;
}
.pp-gp--edit {
  gap: 12px;
  max-width: none;
}
.pp-gp__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.pp-gp__head-main {
  min-width: 0;
  flex: 1 1 auto;
}
.pp-gp__title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.pp-gp__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  color: var(--blue);
  flex: none;
}
.pp-gp__icon .icon { width: 13px; height: 13px; }
.pp-gp__titles { min-width: 0; flex: 1 1 auto; }
.pp-gp__title-line {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
}
.pp-gp__title {
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.pp-gp__desc {
  margin: 3px 0 0;
  font-size: 11px;
  line-height: 1.3;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-gp__share {
  margin: 2px 0 0;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-muted, var(--text-secondary));
}
.pp-gp__badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--neutral-soft);
  color: var(--neutral-text, var(--text-secondary));
  border: 1px solid var(--neutral-border, transparent);
  flex: none;
}
.pp-gp__badge.is-on {
  background: var(--ok-soft);
  color: var(--ok-text);
  border-color: var(--ok-border);
}
.pp-gp__head-acts {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-top: 1px;
}
.pp-gp__configure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: var(--fs-12);
  font-weight: 700;
  cursor: pointer;
  padding: 2px 0;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.pp-gp__configure .icon { width: 14px; height: 14px; }
.pp-gp__configure:hover {
  color: var(--blue-strong, var(--blue));
  text-decoration: underline;
}
.pp-gp__configure:focus-visible {
  outline: 2px solid var(--focus-ring, var(--blue));
  outline-offset: 2px;
}
.pp-help--ipver { margin-top: 6px; }
.pp-gp__stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px 8px;
  min-width: 0;
  margin-top: 0;
}
.pp-gp__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pp-gp__stat-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pp-gp__stat-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-gp__stat-sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Configure global policy surface ---- */
.pp-gpe {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  scroll-margin-top: calc(var(--ws-sticky-offset, 64px) + 12px);
  scroll-margin-bottom: 20px;
}
.pp-gpe__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}
.pp-gpe__titles { min-width: 0; }
.pp-gpe__title {
  margin: 0;
  font-size: var(--fs-15, 15px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
}
.pp-gpe__desc {
  margin: 3px 0 0;
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--text-secondary);
}
.pp-gpe__enabled {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  cursor: pointer;
  user-select: none;
}
.pp-gpe__enabled-label {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text-secondary);
}
.pp-gpe__enabled .switch { gap: 0; }

.pp-gpe__grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: 14px 16px;
  align-items: start;
  min-width: 0;
}
.pp-gpe__card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.pp-gpe__card--preview {
  grid-column: 1 / -1;
  background: color-mix(in srgb, var(--blue-soft) 35%, var(--bg));
}
@supports not (background: color-mix(in srgb, white 50%, black)) {
  .pp-gpe__card--preview { background: var(--bg); }
}
.pp-gpe__card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.pp-gpe__card-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.pp-gpe__card-hint {
  margin: -4px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}
.pp-gpe__ipver {
  width: 100%;
}
.pp-segment--fill {
  display: flex;
  width: 100%;
}
.pp-segment--fill .pp-segment__btn {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: 0 8px;
}
.pp-gpe__ipver .pp-segment__btn.is-active {
  box-shadow: inset 0 0 0 1px var(--blue);
}
.pp-gpe__checks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pp-gpe__check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--fs-12);
  font-weight: 550;
  color: var(--text);
  cursor: pointer;
  line-height: 1.35;
}
.pp-gpe__check input {
  margin: 2px 0 0;
  flex: none;
}
.pp-gpe__check-text {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.pp-gpe__check--solo { margin-top: 2px; }
.pp-gpe__tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: help;
  flex: none;
}
.pp-gpe__tip .icon { width: 13px; height: 13px; }
.pp-gpe__tip:hover { color: var(--blue); }

.pp-gpe__bw-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-width: 0;
}
.pp-gpe__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.pp-gpe__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.pp-gpe__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
.pp-gpe__affix {
  position: absolute;
  left: 10px;
  display: inline-flex;
  color: var(--text-muted);
  pointer-events: none;
}
.pp-gpe__affix .icon { width: 14px; height: 14px; }
.pp-gpe__input {
  height: 36px;
  padding-left: 32px !important;
  padding-right: 52px !important;
  width: 100%;
}
.pp-gpe__unit {
  position: absolute;
  right: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}
.pp-gpe__divider {
  height: 1px;
  background: var(--border-soft);
  margin: 2px 0;
}
.pp-gpe__usage-row {
  display: grid;
  grid-template-columns: minmax(72px, 0.9fr) minmax(72px, 0.7fr) minmax(120px, 1.2fr);
  gap: 8px;
  min-width: 0;
}
.pp-gpe__input--amt {
  height: 36px;
  padding-left: 10px !important;
  padding-right: 10px !important;
}
.pp-gpe__select {
  height: 36px;
  min-width: 0;
}
.pp-gpe__field--at { margin-top: 4px; }
.pp-gpe__help {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.35;
}

.pp-gpe__alloc {
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pp-gpe__alloc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.pp-gpe__alloc-row dt {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 0;
}
.pp-gpe__alloc-row dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.pp-gpe__alloc-ico {
  display: inline-flex;
  color: var(--text-muted);
  flex: none;
}
.pp-gpe__alloc-ico .icon { width: 14px; height: 14px; }
.pp-gpe__callout {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  border: 1px solid var(--blue-border-soft);
}
.pp-gpe__callout-ico {
  display: inline-flex;
  color: var(--blue);
  flex: none;
  margin-top: 1px;
}
.pp-gpe__callout-ico .icon { width: 14px; height: 14px; }
.pp-gpe__callout p {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}

.pp-gpe__dest {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg);
  overflow: hidden;
}
.pp-gpe__dest-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.pp-gpe__dest-head:hover { background: var(--hover); }
.pp-gpe__dest-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pp-gpe__dest-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.pp-gpe__dest-meta {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}
.pp-gpe__dest-chev {
  display: inline-flex;
  color: var(--text-muted);
  flex: none;
}
.pp-gpe__dest-chev .icon { width: 16px; height: 16px; }
.pp-gpe__dest-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border-soft);
  padding-top: 14px;
}
.pp-gpe__dest-ta {
  min-height: 140px;
  max-height: 200px;
}

.pp-gpe__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 2px;
}
.pp-gpe__footnote {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
  min-width: min(100%, 280px);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
}
.pp-gpe__footnote .icon {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 1px;
  color: var(--text-muted);
}
.pp-gpe__acts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-left: auto;
}
.pp-gpe__saved {
  font-size: 12px;
  font-weight: 600;
  color: var(--success-text, #0f7a3f);
  margin-right: 4px;
}

/* Spacing: compact header → table (~32px after toolbar) */
.pp-page > .pp-list,
.pp-page > .pp-vpn,
.pp-page > .pp-bulk-bar,
.pp-page > .pp-composer,
.pp-page > .pp-gp-editor {
  margin-top: 32px;
}
.pp-page > .pp-top + .pp-list,
.pp-page > .pp-top + .pp-vpn,
.pp-page > .pp-top + .pp-bulk-bar,
.pp-page > .pp-gp-editor:not([hidden]) + .pp-list,
.pp-page > .pp-gp-editor:not([hidden]) + .pp-bulk-bar {
  margin-top: 32px;
}
/* OpenVPN / WireGuard: tighter gap between Create profile/peer and the list */
.pp-page > .pp-vpn,
.pp-page > .pp-top + .pp-vpn,
.pp-page > .pp-bulk-bar + .pp-vpn {
  margin-top: 12px;
}
.pp-page > .pp-bulk-bar + .pp-list {
  margin-top: 12px;
}
.pp-page > .pp-vpn + .pp-composer:not([hidden]),
.pp-page > .pp-list + .pp-composer:not([hidden]) {
  margin-top: 18px;
}

/* ---- Bulk selection bar ---- */
.pp-bulk-bar {
  min-width: 0;
}
.pp-bulk-bar[hidden] { display: none !important; }
.pp-bulk-bar .pp-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 8px 12px;
  border: 1px solid var(--blue-border-soft);
  border-radius: var(--radius-md);
  background: var(--blue-soft);
}
.pp-bulk-bar .pp-bulk__count {
  font-size: var(--fs-12);
  font-weight: 700;
  color: var(--blue);
  margin-right: 2px;
  font-variant-numeric: tabular-nums;
}
.pp-bulk__acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.pp-bulk-bar .pp-bulk__acts .btn {
  background: var(--surface);
  border-color: var(--border);
}
.pp-bulk-bar .pp-bulk__acts .btn:hover {
  background: var(--hover);
  border-color: var(--border-strong);
}
.pp-bulk-bar .pp-bulk__acts .btn--danger {
  color: var(--danger-text);
  border-color: var(--danger-border);
  background: var(--surface);
}
.pp-bulk-bar .pp-bulk__acts .btn--danger:hover {
  background: var(--danger-soft);
  border-color: var(--danger-border);
  color: var(--danger-text);
}
.pp-bulk-bar .pp-clear,
.pp-bulk-bar [data-pp-clear-sel] {
  margin-left: auto;
}
.pp-bulk-panel {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 12px 14px;
}
.pp-bulk-panel__inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
}
.pp-bulk-panel__copy strong {
  display: block;
  font-size: var(--fs-13);
  font-weight: 700;
  color: var(--text);
}
.pp-bulk-panel__copy p {
  margin: 4px 0 0;
  font-size: var(--fs-12);
  color: var(--text-secondary);
  font-weight: 500;
}
.pp-bulk-panel__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.pp-empty--vpn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  padding: 28px 20px 24px;
  border: none;
  border-radius: 0;
  background: transparent;
  gap: 4px;
}

/* ---- Container queries: adapt by Workspace width ---- */
@container pp-page (max-width: 1280px) {
  .pp-top {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 440px);
    column-gap: 24px;
  }
  .pp-gpe__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  }
  .pp-gpe__card--preview { grid-column: 1 / -1; }
}

@container pp-page (max-width: 1100px) {
  .pp-top {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }
  .pp-top__end {
    width: 100%;
    padding-top: 0;
    align-items: stretch;
  }
  .pp-top__end .pp-global {
    flex: none;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
  }
  .pp-tlogs-btn {
    align-self: center;
  }
  .pp-global {
    width: 100%;
    max-width: none;
    height: auto;
  }
  .pp-gp__stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px 10px;
  }
  .pp-gp__desc {
    white-space: normal;
  }
  .pp-toolbar {
    flex-wrap: wrap;
  }
}

@container pp-page (max-width: 980px) {
  .pp-gp__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
  .pp-gpe__grid { grid-template-columns: 1fr; }
  .pp-gpe__card--preview { grid-column: auto; }
  .pp-gpe__bw-row { grid-template-columns: 1fr; }
  .pp-list__head,
  .pp-row__line {
    grid-template-columns: 28px minmax(240px, 1.6fr) 90px 80px 130px 70px 120px;
  }
  .pp-list__head--vpn,
  .pp-row__line--vpn,
  .pp-list__head--vpn.pp-list__head--wg,
  .pp-row__line--vpn.pp-row__line--wg {
    grid-template-columns: 28px minmax(0, 1fr) 80px 68px 130px 70px 200px;
  }
  .pp-row__desc,
  .pp-row__desc-text { max-width: min(340px, 40vw); }
}

@container pp-page (max-width: 820px) {
  .pp-gp__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-gpe__usage-row { grid-template-columns: 1fr 1fr; }
  .pp-gpe__usage-row .pp-gpe__select--period { grid-column: 1 / -1; }
  .pp-gpe__footer { flex-direction: column; align-items: stretch; }
  .pp-gpe__acts { margin-left: 0; justify-content: flex-end; }
  .pp-bulk-bar .pp-bulk { align-items: stretch; }
  .pp-bulk-bar [data-pp-clear-sel] { margin-left: 0; }

  .pp-list__head { display: none; }

  .pp-row__line {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 10px 12px;
  }
  .pp-row__line--vpn,
  .pp-row__line--vpn.pp-row__line--wg {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .pp-row__identity { width: 100%; }
  .pp-row__proxyline { flex-wrap: nowrap; }
  .pp-row__proxy { max-width: calc(100% - 110px); }
  .pp-row__desc { max-width: 100%; }

  .pp-metric { display: none; }

  .pp-row__compact {
    display: block;
    grid-column: 2;
    padding-left: 15px;
    font-size: var(--fs-11);
    font-weight: 500;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    line-height: 1.45;
  }
  .pp-row__line--vpn + .pp-row__compact,
  .pp-row__line--vpn ~ .pp-row__compact {
    grid-column: 2;
    padding-left: 15px;
  }

  .pp-grid-2 { grid-template-columns: 1fr; }
}

@container pp-page (max-width: 520px) {
  .pp-ico-btn {
    width: 28px;
    height: 28px;
  }
  .pp-row__actions .pp-act {
    padding: 0 8px;
  }
  .pp-bulk { margin-left: 0; width: 100%; }
}

/* ============================================================
   Workspace pages ? shared IA surfaces (Automation / Device /
   Activity / Diagnostics)
   ============================================================ */
.ws-page {
  container-type: inline-size;
  container-name: ws-page;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.ws-page__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  min-width: 0;
}
.ws-page__title {
  margin: 0;
  font-size: var(--fs-20);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--text);
}
.ws-page__meta {
  margin: 8px 0 0;
  font-size: var(--fs-13);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.ws-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}
.ws-subnav__btn {
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.14s, background 0.14s, border-color 0.14s;
}
.ws-subnav__btn:hover {
  color: var(--text);
  background: var(--hover);
}
.ws-subnav__btn.is-active {
  color: var(--text);
  background: var(--selected);
  border-color: var(--border);
}

.ws-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  min-width: 0;
}
.ws-block {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.ws-block:last-child { border-bottom: none; }
.ws-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.ws-block__title {
  margin: 0 0 6px;
  font-size: var(--fs-13);
  font-weight: 700;
  color: var(--text);
}
.ws-block__head .ws-block__title { margin: 0; }
.ws-block__desc {
  margin: 0 0 10px;
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.45;
}
.ws-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ws-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}
.ws-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text-secondary);
}
.ws-statline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-12);
  font-weight: 550;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.ws-sep { color: var(--text-disabled); }
.ws-muted { color: var(--text-muted); font-weight: 500; }
.ws-empty {
  padding: 28px 16px;
  text-align: center;
  font-size: var(--fs-13);
  color: var(--text-muted);
}
.ws-people { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ws-people__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: var(--fs-13);
  font-weight: 550;
  color: var(--text);
}

/* ============================================================
   Automation — enterprise rules editor
   ============================================================ */
.auto-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding-bottom: 4px;
}

.auto-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-width: 0;
}
.auto-head__copy { min-width: 0; flex: 1 1 240px; }
.auto-head__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.auto-head__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}
.auto-head__badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}
.auto-head__desc {
  margin: 3px 0 0;
  max-width: 56ch;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text-muted);
}
.auto-head__acts {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  flex: none;
}
.auto-head__acts .btn { height: 30px; }
.auto-head__status {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-secondary);
  white-space: nowrap;
}
.auto-head__status[hidden] { display: none !important; }

/* Summary strip */
.auto-sums {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}
.auto-sum {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.auto-sum__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  flex: none;
}
.auto-sum__ico .icon { width: 13px; height: 13px; }
.auto-sum__body { min-width: 0; flex: 1; }
.auto-sum__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}
.auto-sum__name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.auto-sum__cfg {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.auto-sum__meta {
  margin-top: 1px;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auto-badge {
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.01em;
  flex: none;
}
.auto-badge--on {
  background: var(--ok-soft);
  color: var(--ok-text);
  border: 1px solid var(--ok-border);
}
.auto-badge--off {
  background: var(--neutral-soft);
  color: var(--neutral-text);
  border: 1px solid var(--neutral-border);
}
.auto-badge--root {
  background: var(--warn-soft);
  color: var(--warn-text);
  border: 1px solid var(--warn-border);
  vertical-align: middle;
}

/* Config rows — shared column rails */
.auto-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.auto-card {
  display: grid;
  grid-template-columns: minmax(190px, 240px) 80px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: none;
  box-sizing: border-box;
}
.auto-card__id,
.auto-card__status,
.auto-card__cfg {
  padding: 7px 12px;
  min-width: 0;
  align-self: stretch;
  display: flex;
}
.auto-card__id {
  align-items: center;
  gap: 7px;
  border-right: 1px solid var(--border-soft);
}
.auto-card__status {
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border-soft);
}
.auto-card__cfg {
  align-items: center;
}
.auto-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 9px;
  font-weight: 600;
  flex: none;
  margin-top: 1px;
}
.auto-card__glyph {
  display: none;
}
.auto-card__titles { min-width: 0; flex: 1; }
.auto-card__title {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.2;
}
.auto-card__desc {
  margin: 1px 0 0;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-muted);
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
.auto-card.is-disabled .auto-card__title { color: var(--text); }
.auto-card__cfg.is-dim {
  opacity: 0.5;
  pointer-events: none;
}

.auto-switch {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.auto-switch__label {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-muted);
}

.auto-cfg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  width: 100%;
  justify-content: center;
}
.auto-cfg--simple {
  justify-content: center;
}
.auto-cfg--flow {
  gap: 4px;
}
.auto-cfg--rows {
  gap: 0;
  justify-content: center;
}
.auto-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  min-width: 0;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-soft);
}
.auto-setting-row:first-child { padding-top: 0; }
.auto-setting-row:last-of-type { border-bottom: none; padding-bottom: 0; }
.auto-cfg--rows .auto-info { margin-top: 6px; }
.auto-setting-row__label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
}
.auto-setting-row__ctrl {
  flex: none;
  display: flex;
  align-items: center;
}
.auto-setting-row .auto-num {
  width: 64px;
  height: 30px;
}
.auto-setting-row .auto-unit--static {
  height: 30px;
  min-width: 60px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-secondary);
  pointer-events: none;
  user-select: none;
}
.auto-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.auto-field__label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
}
.auto-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 4px 8px;
}
.auto-inline--wrap .auto-field { min-width: 88px; }

.auto-numunit {
  display: inline-flex;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
}
.auto-num {
  width: 72px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg, var(--surface));
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.auto-num:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue-soft);
}
.auto-num:disabled {
  color: var(--text-disabled);
  background: var(--surface-2);
}
.auto-unit {
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  appearance: none;
}
.auto-unit--static {
  display: inline-flex;
  align-items: center;
  min-width: 60px;
  justify-content: center;
  font-weight: 400;
}
.auto-time {
  width: 108px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg, var(--surface));
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}
.auto-time:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue-soft);
}
.auto-fixed {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.auto-seg {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
}
.auto-seg__btn {
  height: 24px;
  padding: 0 9px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
}
.auto-seg__btn + .auto-seg__btn { border-left: 1px solid var(--border-soft); }
.auto-seg__btn:hover { background: var(--hover); color: var(--text); }
.auto-seg__btn.is-active {
  background: var(--blue-soft);
  color: var(--blue);
}

.auto-info {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  border: 1px solid var(--blue-border-soft);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
}
.auto-info__ico {
  display: inline-flex;
  color: var(--blue);
  flex: none;
}
.auto-info__ico .icon { width: 11px; height: 11px; }
.auto-info__text { min-width: 0; }
.auto-statusline {
  margin: 0;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
}

/* Connection recovery flow — compact horizontal sequence */
.auto-flow {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
}
.auto-step {
  flex: 1 1 0;
  min-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 8px 7px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  text-align: center;
}
.auto-step--final { justify-content: center; }
.auto-step__ico {
  display: inline-flex;
  color: var(--blue);
}
.auto-step__ico .icon { width: 15px; height: 15px; }
.auto-step__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
}
.auto-step__t {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  max-width: 14ch;
}
.auto-step__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 0;
}
.auto-flow__arrow {
  display: inline-flex;
  align-items: center;
  color: var(--icon-muted);
  flex: none;
  align-self: center;
}
.auto-flow__arrow .icon { width: 14px; height: 14px; }
.auto-step .auto-num { width: 40px; height: 26px; font-size: 12px; }
.auto-step .auto-unit,
.auto-step .auto-unit--static {
  height: 26px;
  min-width: 48px;
  font-size: 10px;
  padding: 0 5px;
}

@media (max-width: 1100px) {
  .auto-sums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auto-card {
    grid-template-columns: minmax(180px, 1fr) 90px minmax(0, 1.4fr);
  }
}

@media (max-width: 860px) {
  .auto-card {
    grid-template-columns: 1fr;
  }
  .auto-card__id,
  .auto-card__status {
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
  }
  .auto-card__status { padding-top: 12px; padding-bottom: 12px; }
  .auto-flow__arrow {
    transform: rotate(90deg);
    margin: 0 auto;
  }
  .auto-step { max-width: none; }
  .auto-setting-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .auto-sums { grid-template-columns: 1fr; }
  .auto-head__acts { width: 100%; }
  .auto-head__acts .btn { flex: 1 1 auto; justify-content: center; }
}

/* Activity — page shell & Timeline */
.act-page { gap: 0; }
.act-page .ws-page__head { margin-bottom: 0; }
.act-page .ws-page__meta { margin-top: 6px; }
.act-subnav {
  margin-top: 10px;
  margin-bottom: 20px;
  padding: 3px;
  align-items: center;
  gap: 8px;
  border-bottom: none;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  flex-shrink: 0;
}
.act-subnav::-webkit-scrollbar { display: none; }
.act-subnav .ws-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0;
  transition: background-color 0.14s, border-color 0.14s, color 0.14s;
}
.act-subnav .ws-tab:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}
.act-subnav .ws-tab.is-active {
  background: var(--blue-soft);
  border-color: var(--blue-border);
  color: var(--blue);
  font-weight: 600;
}
.act-subnav .ws-tab.is-active:hover { background: var(--blue-soft-2); }
.act-subnav .ws-tab:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
.act-subnav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  flex: none;
}
.act-subnav__icon .icon { width: 15px; height: 15px; stroke-width: 1.5; }
.act-subnav__label { white-space: nowrap; }

/* Activity — Uptime */
.act-up {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.act-up-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  min-height: 0;
  padding: 10px 4px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.act-up-summary__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  min-width: 0;
  border-right: 1px solid var(--border-soft);
}
.act-up-summary__item > div {
  min-width: 0;
}
.act-up-summary__item:last-child { border-right: none; }
.act-up-summary__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  flex: none;
}
.act-up-summary__ico .icon { width: 12px; height: 12px; }
.act-up-summary__ico--ok { color: var(--ok-text); background: var(--ok-soft); }
.act-up-summary__ico--danger { color: var(--danger-text); background: var(--danger-soft); }
.act-up-summary__ico--warn { color: var(--warn-text); background: var(--warn-soft); }
.act-up-summary__ico--blue { color: var(--blue); background: var(--blue-soft); }
.act-up-summary__ico--orange { color: var(--warn-text); background: var(--warn-soft); }
.act-up-summary__value {
  display: block;
  font-size: var(--fs-14);
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--text);
}
.act-up-summary__value--ok { color: var(--ok-text); }
.act-up-summary__value--danger { color: var(--danger-text); }
.act-up-summary__value--warn { color: var(--warn-text); }
.act-up-summary__value--blue { color: var(--blue); }
.act-up-summary__value--orange { color: var(--warn-text); }
.act-up-summary__label {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.2;
}

.act-up-daily {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.act-up-daily__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.act-up-daily__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  min-width: 0;
}
.act-up-daily__title {
  margin: 0;
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--text);
}
.act-up-daily__nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.act-up-nav-btn,
.act-up-today-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-12);
  font-weight: 600;
  cursor: pointer;
}
.act-up-nav-btn { width: 32px; padding: 0; }
.act-up-nav-btn .icon { width: 14px; height: 14px; }
.act-up-nav-btn:hover:not(:disabled),
.act-up-today-btn:hover:not(:disabled) { background: var(--hover); border-color: var(--border-strong); }
.act-up-nav-btn:disabled,
.act-up-today-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.act-up-date-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 32px;
  padding: 0 8px;
  font-size: var(--fs-12);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  text-align: center;
  user-select: none;
}
.act-up-today-btn { padding: 0 10px; margin-left: 2px; }
.act-up-daily__tz {
  font-size: var(--fs-11);
  font-weight: 600;
  color: var(--text-muted);
}
.act-up-legend {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  font-size: var(--fs-11);
  font-weight: 600;
  color: var(--text-muted);
}
.act-up-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.act-up-legend__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.act-up-legend__dot--available { background: var(--ok); }
.act-up-legend__dot--degraded { background: var(--warn); }
.act-up-legend__dot--outage { background: var(--danger); }
.act-up-legend__dot--nodata { background: var(--border-strong); }

.act-up-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}
.act-up-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.1s, background 0.1s;
}
.act-up-tile:hover:not(:disabled) { background: var(--hover); }
.act-up-tile.is-selected {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.act-up-tile.is-future {
  opacity: 0.55;
  cursor: default;
}
.act-up-tile__hour {
  font-size: var(--fs-13);
  font-weight: 650;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.act-up-tile__meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: auto;
  font-size: var(--fs-11);
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.25;
}
.act-up-bar {
  display: flex;
  width: 100%;
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
}
.act-up-bar__seg { display: block; height: 100%; min-width: 0; }
.act-up-bar__seg--available { background: var(--ok); }
.act-up-bar__seg--degraded { background: var(--warn); }
.act-up-bar__seg--outage { background: var(--danger); }
.act-up-bar__seg--nodata { background: var(--border); }
.act-up-bar__seg--future { background: transparent; }

.act-up-detail {
  margin-top: 2px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.act-up-detail__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 10px;
}
.act-up-detail__title {
  margin: 0;
  font-size: var(--fs-13);
  font-weight: 700;
  color: var(--text);
}
.act-up-detail__meta {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text-muted);
}
.act-up-detail__labels {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2px;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.act-up-detail__labels span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.act-up-detail__bar {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--border);
}
.act-up-detail__slot {
  display: block;
  height: 100%;
  min-width: 0;
  flex: 0 0 auto;
}
.act-up-detail__slot[data-tip] {
  cursor: help;
  position: relative;
  z-index: 1;
}
.act-up-detail__slot[data-tip]:hover {
  filter: brightness(0.92);
}

.act-up-inc {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.act-up-inc__head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.act-up-inc__title {
  margin: 0;
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--text);
}
.act-up-inc__count {
  font-size: var(--fs-12);
  font-weight: 700;
  color: var(--text-muted);
}
.act-up-inc__empty {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
}
.act-up-inc__list {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}
.act-up-inc__row {
  display: grid;
  grid-template-columns: 10px minmax(140px, 1.1fr) 72px minmax(0, 1.4fr) 88px 16px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 0 12px;
  border: none;
  border-bottom: 1px solid var(--border-soft);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.act-up-inc__row:last-child { border-bottom: none; }
.act-up-inc__row:hover { background: var(--hover); }
.act-up-inc__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
}
.act-up-inc__time {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text);
}
.act-up-inc__dur {
  font-size: var(--fs-12);
  font-weight: 650;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.act-up-inc__cause {
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--text-secondary);
}
.act-up-inc__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--ok-text);
}
.act-up-inc__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}
/* an outage still open (the device is offline now) */
.act-up-inc__status.is-ongoing { color: var(--danger-text); }
.act-up-inc__status.is-ongoing .act-up-inc__status-dot { background: var(--danger); }
.act-up-inc__chev {
  display: inline-flex;
  color: var(--text-disabled);
}
.act-up-inc__chev .icon { width: 14px; height: 14px; }

.act-up-drawer { padding: 4px 2px 12px; }
.act-up-drawer__title { margin-right: 8px; font-weight: 700; }
.act-up-drawer__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin-bottom: 16px;
}
.act-up-drawer__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.act-up-drawer__value {
  display: block;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text);
}
.act-up-drawer__timeline { width: 100%; justify-content: center; }

@container ws-page (max-width: 1100px) {
  .act-up-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .act-up-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .act-up-summary__item { border-bottom: 1px solid var(--border-soft); }
  .act-up-summary__item:nth-child(3n) { border-right: none; }
  .act-up-summary__item:nth-child(n+4) { border-bottom: none; }
}
@container ws-page (max-width: 820px) {
  .act-up-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .act-up-inc__row {
    grid-template-columns: 10px minmax(0, 1fr) 16px;
    grid-template-rows: auto auto;
    gap: 4px 10px;
    padding: 10px 12px;
    min-height: 0;
  }
  .act-up-inc__dur,
  .act-up-inc__cause,
  .act-up-inc__status { grid-column: 2; }
  .act-up-inc__chev { grid-column: 3; grid-row: 1 / span 2; }
}
@container ws-page (max-width: 640px) {
  .act-up-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .act-up-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; }
  .act-up-summary__item:nth-child(n+4) { display: none; }
  .act-up-summary__item {
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 4px 8px;
    border-bottom: none;
    text-align: center;
  }
  .act-up-summary__item > div {
    width: 100%;
    text-align: center;
  }
  .act-up-summary__item:nth-child(3n) { border-right: none; }
  .act-up-summary__ico { width: 20px; height: 20px; }
  .act-up-summary__ico .icon { width: 10px; height: 10px; }
  .act-up-summary__value { font-size: var(--fs-12); text-align: center; }
  .act-up-summary__label { font-size: 9px; max-width: 100%; text-align: center; }
  .act-up-tile {
    align-items: center;
    text-align: center;
    gap: 4px;
    padding: 5px 3px 6px;
    min-height: 0;
  }
  .act-up-tile__hour { width: 100%; font-size: 10px; font-weight: 600; line-height: 1.1; text-align: center; }
  .act-up-tile__meta { align-items: center; width: 100%; margin-top: 0; font-size: 9px; font-weight: 500; line-height: 1.15; text-align: center; }
  .act-up-bar { height: 6px; }
  .act-up-detail__labels { font-size: 9px; }
}

/* ---------- Activity > IP History ---------- */
.act-iph {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.act-iph-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  min-width: 0;
}
.act-iph-toolbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  margin-left: auto;
}
.act-iph-trigger-btn,
.act-iph-export {
  height: 32px;
  gap: 6px;
  font-size: var(--fs-12);
  font-weight: 600;
}
.act-iph-trigger-btn .icon,
.act-iph-export .icon { width: 14px; height: 14px; }
.act-iph-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(220px, 100%);
}
.act-iph-search .icon {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  pointer-events: none;
}
.act-iph-search .form-input {
  height: 32px;
  padding-left: 30px;
  font-size: var(--fs-12);
}

.act-iph-summary {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(0, 1fr));
  align-items: stretch;
  min-height: 100px;
  max-height: 120px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}
.act-iph-summary__item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 14px 16px;
  border-right: 1px solid var(--border-soft);
  min-width: 0;
}
.act-iph-summary__item:last-child { border-right: none; }
.act-iph-summary__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.act-iph-summary__value {
  font-size: var(--fs-18);
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.act-iph-summary__sub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-12);
  color: var(--text-muted);
}
.act-iph-summary__ip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.act-iph-summary__ip {
  font-size: var(--fs-16);
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.act-iph-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
  flex: none;
}
.act-iph-dot--ok { background: var(--ok); }

.act-iph-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex: none;
}
.act-iph-copy:hover { background: var(--hover); color: var(--text); }
.act-iph-copy .icon { width: 13px; height: 13px; }
.act-iph-copy.is-copied { color: var(--ok-text); }

.act-iph-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}
.act-iph.is-drawer-open .act-iph-main {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
}

.act-iph-table-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  min-width: 0;
}
.act-iph-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.act-iph-table-title {
  margin: 0;
  font-size: var(--fs-13);
  font-weight: 700;
  color: var(--text);
}
.act-iph-pager {
  display: flex;
  align-items: center;
  gap: 8px;
}
.act-iph-pager__meta {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.act-iph-pager__nav { display: flex; gap: 2px; }
.act-iph-pager__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
}
.act-iph-pager__btn:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.act-iph-pager__btn:disabled { opacity: 0.4; cursor: default; }
.act-iph-pager__btn .icon { width: 14px; height: 14px; }

.act-iph-table-scroll { overflow-x: auto; }
.act-iph-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-12);
}
.act-iph-table th {
  height: 44px;
  padding: 0 12px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
  background: var(--bg);
}
.act-iph-th {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.act-iph-th:hover { color: var(--text); }
.act-iph-table td {
  height: 52px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
  vertical-align: middle;
  white-space: nowrap;
}
.act-iph-table tbody tr:last-child td { border-bottom: none; }
.act-iph-row { cursor: pointer; }
.act-iph-row:hover { background: var(--hover); }
.act-iph-row.is-current { background: color-mix(in srgb, var(--ok) 6%, var(--surface)); }
.act-iph-row.is-current:hover { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
@supports not (background: color-mix(in srgb, white 50%, black)) {
  .act-iph-row.is-current { background: var(--ok-soft); }
}
.act-iph-row.is-selected { background: var(--blue-soft); }
.act-iph-acquired {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.act-iph-ipcell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}
/* IPv4 and IPv6 of one lease: the address that did not change is dimmed */
.act-iph-ip--same { opacity: 0.45; }
.act-iph-ip--none { color: var(--text-muted); }
.act-iph-col--v6 .mono { color: var(--text-secondary); }
.act-iph-v6-inline { display: none; }
.act-iph-summary__ips {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.act-iph-fam {
  min-width: 28px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.act-iph-summary__ip6 {
  font-size: var(--fs-12);
  color: var(--text-secondary);
}
.act-iph-life--current { color: var(--ok-text); font-weight: 600; }
.act-iph-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}
.act-iph-trigger__ico {
  display: inline-flex;
  color: var(--text-muted);
}
.act-iph-trigger__ico .icon { width: 13px; height: 13px; }
.act-iph-reuse {
  color: #6d28d9;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.act-iph-empty {
  padding: 36px 20px;
  text-align: center;
}
.act-iph-empty p { margin: 0 0 6px; }
.act-iph-empty__hint {
  font-size: var(--fs-12);
  color: var(--text-muted);
}
.act-iph-error {
  padding: 40px 20px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.act-iph-error p { margin: 0 0 12px; font-weight: 600; }

.act-iph-drawer {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 16px 18px 18px;
  min-width: 0;
  max-height: calc(100vh - 220px);
  overflow: auto;
  position: sticky;
  top: 12px;
}
.act-iph-drawer__head { margin-bottom: 18px; }
.act-iph-drawer__title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.act-iph-drawer__ip {
  font-size: var(--fs-15);
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.act-iph-status {
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.act-iph-status--current {
  background: var(--ok-soft);
  color: var(--ok-text);
}
.act-iph-status--ended {
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.act-iph-drawer__close {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.act-iph-drawer__close:hover { background: var(--hover); color: var(--text); }
.act-iph-drawer__close .icon { width: 14px; height: 14px; }
.act-iph-drawer__sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  font-size: var(--fs-12);
  color: var(--text-muted);
}
.act-iph-sec { margin-top: 20px; }
.act-iph-sec__title {
  margin: 0 0 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.act-iph-sec__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.act-iph-field { min-width: 0; }
.act-iph-field--wide { grid-column: 1 / -1; }
.act-iph-field__label {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}
.act-iph-field__value {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  word-break: break-word;
}
.act-iph-url {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}
.act-iph-appearances {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}
.act-iph-appearances__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
}

.act-iph-skel {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--bg) 25%, var(--hover) 50%, var(--bg) 75%);
  background-size: 200% 100%;
  animation: act-iph-shimmer 1.2s ease-in-out infinite;
}
.act-iph-skel--summary { height: 108px; }
.act-iph-skel--table { height: 360px; }
@keyframes act-iph-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@container ws-page (max-width: 1100px) {
  .act-iph.is-drawer-open .act-iph-main {
    grid-template-columns: minmax(0, 1fr);
  }
  .act-iph-drawer {
    position: static;
    max-height: none;
  }
  .act-iph-col--prev,
  .act-iph-col--reuse { display: none; }
}
@container ws-page (max-width: 820px) {
  .act-iph-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }
  .act-iph-summary__item {
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
  }
  .act-iph-summary__item--current { grid-column: 1 / -1; }
  .act-iph-toolbar__right { width: 100%; margin-left: 0; }
  .act-iph-search { flex: 1; width: auto; }
}
@container ws-page (max-width: 640px) {
  .act-iph-table thead { display: none; }
  .act-iph-table,
  .act-iph-table tbody,
  .act-iph-table tr,
  .act-iph-table td { display: block; width: 100%; }
  .act-iph-table tr {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-soft);
  }
  .act-iph-table td {
    height: auto;
    padding: 2px 0;
    border: none;
    white-space: normal;
  }
  .act-iph-table td:nth-child(n+4) { display: none; }
  .act-iph-row { position: relative; }
}

/* ---------- Activity > Usage ---------- */
.act-usage {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding-top: 4px;
}
.act-usage-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}
.act-usage-toolbar--month {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 36px;
}
.act-usage-toolbar--month .act-usage-chart-nav {
  margin: 0;
  justify-content: center;
}
.act-usage-toolbar--month .act-usage-export {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.act-usage-toolbar .act-usage-export {
  flex: none;
  width: 36px;
  min-width: 36px;
  padding: 0;
  justify-content: center;
  color: var(--blue);
}
.act-usage-toolbar .act-usage-export .icon { width: 14px; height: 14px; }

.act-usage-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  min-height: 124px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}
.act-usage-ov {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--border-soft);
}
.act-usage-ov:last-child { border-right: none; }
.act-usage-ov__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 22px;
}
.act-usage-ov__head-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.act-usage-ov__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--hover);
  color: var(--text-muted);
  flex: none;
}
.act-usage-ov__badge .icon { width: 12px; height: 12px; }
.act-usage-ov__badge--live {
  background: var(--ok-soft);
  color: var(--ok);
}
.act-usage-ov__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.2;
}
.act-usage-ov__ico {
  display: inline-flex;
  color: var(--text-muted);
  opacity: 0.7;
}
.act-usage-ov__ico .icon { width: 11px; height: 11px; }
.act-usage-ov__value {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.act-usage-ov__du {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.act-usage-ov__quota-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.25;
}
.act-usage-ov--quota[data-band="warning"] .act-usage-ov__value { color: var(--warn); }
.act-usage-ov--quota[data-band="critical"] .act-usage-ov__value,
.act-usage-ov--quota[data-band="exhausted"] .act-usage-ov__value { color: var(--blue); }
.act-usage-ov__sub {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.25;
}
.act-usage-ov__sub-ico {
  display: inline-flex;
  color: var(--text-muted);
  opacity: 0.75;
}
.act-usage-ov__sub-ico .icon { width: 12px; height: 12px; }
.act-usage-ov--mobile { display: none; }
.act-usage-ov--session .act-usage-session-row {
  justify-content: flex-start;
}
.act-usage-session-foot {
  margin-top: 2px;
  font-weight: 600;
  color: var(--text);
}
.act-usage-session-updated {
  margin-top: 0;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
}

.act-usage-live-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}
.act-usage-live-row__main {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.act-usage-live-row__text {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.act-usage-live-row__val {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
}
.act-usage-live-row__lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}
.act-usage-spark {
  display: block;
  flex: none;
  width: 58px;
  height: 22px;
}
.act-usage-spark--bars { color: var(--blue); }
.act-usage-ov__mini {
  display: flex;
  align-items: flex-end;
  min-height: 24px;
  color: var(--blue);
}
.act-usage-ov__mini .act-usage-spark {
  width: 100%;
  height: 24px;
}
.act-usage-insight {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.act-usage-insight--peak {
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: flex-start;
}
.act-usage-insight__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.act-usage-insight__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex: none;
}
.act-usage-insight__ico .icon { width: 11px; height: 11px; }
.act-usage-insight__ico--avg {
  background: var(--blue-soft);
  color: var(--blue);
}
.act-usage-insight__ico--peak {
  background: var(--ok-soft);
  color: var(--ok);
}
.act-usage-insight__lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}
.act-usage-insight__val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.act-usage-insight__sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
}
.act-usage-insight-divider {
  height: 1px;
  margin: 1px 0;
  background: var(--border-soft);
}
.act-usage-ov__label--ico {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: none;
  letter-spacing: 0;
}
.act-usage-ov__ico-inline {
  display: inline-flex;
  flex-shrink: 0;
}
.act-usage-ov__label--peak .act-usage-ov__ico-inline { color: #7c3aed; }
.act-usage-ov__label--month .act-usage-ov__ico-inline { color: var(--blue); }
.act-usage-trend {
  margin-top: auto;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
}
.act-usage-trend--up { color: var(--ok-text, #16a34a); }
.act-usage-trend--down { color: #dc2626; }
.act-usage-ov__rates {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
}
.act-usage-rate {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: var(--fs-18);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.act-usage-rate__arrow { font-size: 14px; font-weight: 700; }
.act-usage-rate--down { color: var(--ok-text, #16a34a); }
.act-usage-rate--up { color: #7c3aed; }
.act-usage-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok-text);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}
.act-usage-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  flex: none;
}
.act-usage-dot--ok { background: var(--ok); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ok) 22%, transparent); }

.act-usage-progress { margin-top: 2px; }
.act-usage-progress__meta {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.act-usage-progress__track {
  height: 6px;
  border-radius: 999px;
  background: var(--hover);
  overflow: hidden;
}
.act-usage-progress__fill {
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.act-usage-stack {
  display: flex;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--hover);
  margin: 4px 0 2px;
}
.act-usage-stack__down { background: var(--ok); }
.act-usage-stack__up { background: #7c3aed; }
.act-usage-break {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.act-usage-break > div {
  display: flex;
  align-items: center;
  gap: 7px;
}
.act-usage-swatch {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}
.act-usage-swatch--down { background: var(--ok); }
.act-usage-swatch--up { background: #7c3aed; }
.act-usage-swatch--total { background: var(--blue); }

.act-usage-chart-card,
.act-usage-ports {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
  min-width: 0;
}
.act-usage-chart-card__head,
.act-usage-ports__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 0;
  flex-wrap: wrap;
}
.act-usage-chart-card__title,
.act-usage-ports__title,
.act-usage-ports__head h3 {
  margin: 0;
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.act-usage-chart-card__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}
.act-usage-chart-card__controls .btn,
.act-usage-ports__head .btn {
  height: 30px;
  font-size: var(--fs-12);
  font-weight: 600;
  gap: 4px;
}
.act-usage-chart-card__controls .act-usage-chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.act-usage-chart-card__controls .act-usage-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.act-usage-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: help;
}
.act-usage-info .icon { width: 14px; height: 14px; }
.act-usage-info:hover { color: var(--text); background: var(--hover); }

.act-usage-chart-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}
.act-usage-chart-nav__label {
  min-width: 112px;
  text-align: center;
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.act-usage-chart-wrap {
  position: relative;
  padding: 4px 12px 12px;
  min-width: 0;
}
.act-usage-chart {
  display: block;
  width: 100%;
  height: 260px;
  touch-action: pan-y;
}
.act-usage-tip {
  position: absolute;
  z-index: 2;
  min-width: 128px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  line-height: 1.35;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.act-usage-tip__date {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.act-usage-tip__row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.act-usage-tip__row .act-usage-swatch {
  width: 7px;
  height: 7px;
}
.act-usage-tip__total {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.act-usage-tip__total strong { font-weight: 700; }
.act-usage-chart-legend {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 8px 12px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.act-usage-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.act-usage-ports__list {
  display: flex;
  flex-direction: column;
  padding: 2px 0;
}
.act-usage-prow {
  display: grid;
  grid-template-columns: 22px minmax(120px, 1.2fr) minmax(96px, 0.9fr) minmax(140px, 1.4fr) minmax(108px, 1fr) 14px;
  align-items: center;
  gap: 4px 10px;
  width: 100%;
  min-height: 44px;
  max-height: 52px;
  padding: 6px 12px;
  border: none;
  border-top: 1px solid var(--border-soft);
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  transition: background 0.1s;
  line-height: 1.25;
}
.act-usage-prow:first-child { border-top: none; }
.act-usage-prow:hover { background: var(--hover); }
.act-usage-prow.is-selected {
  background: color-mix(in srgb, var(--blue-soft) 70%, transparent);
  box-shadow: inset 2px 0 0 var(--blue);
}
.act-usage-prow__rank {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.act-usage-prow__ident {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.act-usage-prow__port {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 550;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.act-usage-prow__name {
  padding-left: 11px;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.act-usage-prow__total {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.act-usage-prow__total strong {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.act-usage-prow__du {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.act-usage-prow__share {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.act-usage-prow__pct {
  font-size: 12px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.act-usage-prow__bar {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: var(--hover);
  overflow: hidden;
}
.act-usage-prow__bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}
.act-usage-prow__live { min-width: 0; }
.act-usage-pstatus {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
}
.act-usage-pstatus--live { color: var(--ok-text); }
.act-usage-pstatus .act-usage-dot { margin-right: 4px; }
.act-usage-pstatus__rates {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.act-usage-prow__chev {
  display: inline-flex;
  color: var(--text-muted);
  opacity: 0.55;
}
.act-usage-prow__chev .icon { width: 12px; height: 12px; }
.act-usage-prow--mobile { display: none; }
.act-usage-clear {
  border: none;
  background: transparent;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 2px;
}
.act-usage-clear:hover { text-decoration: underline; }
.act-usage-empty {
  margin: 0;
  padding: 20px 14px 22px;
  font-size: var(--fs-13);
  color: var(--text-muted);
}
.act-usage-tz {
  margin: 0;
  padding: 0 2px 4px;
  font-size: 11px;
  color: var(--text-muted);
}

@container ws-page (max-width: 1100px) {
  .act-usage-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .act-usage-ov--live,
  .act-usage-ov--session,
  .act-usage-ov--today {
    border-bottom: 1px solid var(--border-soft);
  }
  .act-usage-ov--today,
  .act-usage-ov--month {
    border-right: none;
  }
  .act-usage-prow {
    grid-template-columns: 24px minmax(120px, 1.1fr) minmax(90px, 0.8fr) minmax(120px, 1.2fr) 18px;
    max-height: none;
  }
  .act-usage-prow__live { display: none; }
}
@container ws-page (max-width: 720px) {
  .act-usage-overview {
    grid-template-columns: 1fr;
    max-height: none;
  }
  .act-usage-ov {
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
  }
  .act-usage-ov:last-child { border-bottom: none; }
  .act-usage-prow {
    grid-template-columns: 20px minmax(0, 1fr) 14px;
    gap: 4px 8px;
    max-height: none;
    min-height: 0;
    padding: 8px 10px;
  }
  .act-usage-prow__total,
  .act-usage-prow__share {
    grid-column: 2;
  }
  .act-usage-prow__live {
    display: flex;
    grid-column: 2;
  }
  .act-usage-chart-card__controls { width: 100%; }
  .act-usage-chart-card__controls .btn { flex: 1; }
}

.act-top {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
  min-width: 0;
}

/* Period toolbar — segmented control + download */
.act-period-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  min-height: 56px;
  padding: 10px 18px;
  margin-bottom: 16px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
  min-width: 0;
}
.act-period-bar__main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.act-period-bar__label {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text-muted);
  flex: none;
  line-height: 1;
}
.act-period-seg {
  display: inline-flex;
  align-items: stretch;
  height: 40px;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface);
}
.act-period-seg__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 100%;
  padding: 0 14px;
  border: none;
  border-right: 1px solid var(--border-soft);
  background: var(--surface);
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s, color 0.1s;
}
.act-period-seg__btn:last-child { border-right: none; }
.act-period-seg__btn:hover:not(.is-active) { background: var(--hover); }
.act-period-seg__btn.is-active {
  background: var(--blue-soft);
  color: var(--blue);
}
.act-period-seg__btn--custom { padding: 0 12px; }
.act-period-seg__custom-label {
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.act-period-seg__btn .icon { width: 14px; height: 14px; flex: none; }
.act-period-bar__dl {
  height: 40px;
  padding: 0 14px;
  font-size: var(--fs-12);
  flex-shrink: 0;
  color: var(--blue);
}
.act-period-bar__dl .icon { width: 14px; height: 14px; }

.act-range {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.act-range__field {
  flex: 1 1 200px;
  max-width: 240px;
  min-width: 0;
}
.act-range .dtp { gap: 4px; }
.act-range .dtp__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.act-range .dtp__control { height: 36px; }

.act-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
  min-width: 0;
}
.act-summary__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
  min-height: 0;
}
.act-summary__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  flex: none;
}
.act-summary__icon .icon { width: 15px; height: 15px; }
.act-summary__icon--uptime { color: var(--ok-text); background: var(--ok-soft); }
.act-summary__icon--interrupt { color: var(--danger-text); background: var(--danger-soft); }
.act-summary__icon--ip { color: var(--blue); background: var(--blue-soft); }
.act-summary__icon--warn { color: var(--warn-text); background: var(--warn-soft); }
.act-summary__text { min-width: 0; }
.act-summary__label {
  display: block;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.2;
}
.act-summary__value {
  display: block;
  margin-top: 3px;
  font-size: var(--fs-18);
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

/* Timeline filters toolbar — compact observability bar */
.act-tl-toolbar-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  min-width: 0;
}
.act-tl-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}
.act-tl-toolbar__left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: none;
}
.act-tl-toolbar__title {
  margin: 0 4px 0 0;
  font-size: var(--fs-16);
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  flex: none;
}
.act-filter-select {
  height: 34px;
  font-size: var(--fs-12);
  flex: none;
}
.act-filter-select--events {
  width: 132px;
  min-width: 132px;
}
.act-flt-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  min-height: 34px;
  padding: 0 10px;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  flex: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.act-flt-btn__ico {
  display: inline-flex;
  color: var(--icon-muted);
  flex: none;
}
.act-flt-btn__ico .icon { width: 14px; height: 14px; }
.act-flt-btn__text { line-height: 1; }
.act-flt-btn__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  flex: none;
}
.act-flt-btn:hover { color: var(--text); background: var(--hover); }
.act-flt-btn:hover .act-flt-btn__ico { color: var(--icon); }
.act-flt-btn--active {
  color: var(--blue);
  border-color: var(--blue-border);
  background: var(--blue-soft);
}
.act-flt-btn--active .act-flt-btn__ico { color: var(--blue); }
.act-tl-filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 0;
}
.act-tl-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 24px;
  padding: 0 4px 0 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  flex: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.act-tl-filter-chip--severity-info {
  color: var(--blue-text);
  border-color: var(--blue-border);
  background: var(--blue-soft);
}
.act-tl-filter-chip--severity-warning {
  color: var(--warn-text);
  border-color: var(--warn-border, rgba(234, 179, 8, 0.35));
  background: var(--warn-soft, rgba(234, 179, 8, 0.1));
}
.act-tl-filter-chip--severity-error {
  color: var(--danger-text);
  border-color: var(--danger-border, rgba(239, 68, 68, 0.35));
  background: var(--danger-soft, rgba(239, 68, 68, 0.08));
}
.act-tl-filter-chip--status-active {
  color: var(--blue-text);
  border-color: var(--blue-border);
  background: var(--blue-soft);
}
.act-tl-filter-chip--status-failed {
  color: var(--danger-text);
  border-color: var(--danger-border, rgba(239, 68, 68, 0.35));
  background: var(--danger-soft, rgba(239, 68, 68, 0.08));
}
.act-tl-filter-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.act-tl-filter-chip__remove:hover { background: var(--hover); color: var(--text); }
.act-tl-filter-chip__remove .icon { width: 11px; height: 11px; }
.act-search-wrap {
  position: relative;
  flex: 0 0 auto;
  width: clamp(240px, 28vw, 320px);
  max-width: 100%;
  min-width: 0;
}
.act-search-wrap__ico {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  color: var(--icon-muted);
  pointer-events: none;
}
.act-search-wrap__ico .icon { width: 14px; height: 14px; }
.act-search {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 32px;
  font-size: var(--fs-12);
}

.popover--act-filters {
  width: min(320px, calc(100vw - 24px));
  max-width: min(320px, calc(100vw - 24px));
  padding: 12px;
}
.act-flt-pop__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.act-flt-pop__title {
  margin: 0;
  font-size: var(--fs-13);
  font-weight: 700;
  color: var(--text);
}
.act-flt-pop__hint {
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}
.act-flt-pop__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.act-flt-pop__group:last-of-type { margin-bottom: 12px; }
.act-flt-pop__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.act-flt-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.act-flt-seg__btn {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  flex: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.act-flt-seg__btn:hover { color: var(--text); background: var(--hover); }
.act-flt-seg__btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
.act-flt-seg__btn.is-active {
  color: var(--blue);
  border-color: var(--blue-border);
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px var(--blue-border);
}
.act-flt-seg--severity .act-flt-seg__btn--info.is-active {
  color: var(--blue-text);
  border-color: var(--blue-border);
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px var(--blue-border);
}
.act-flt-seg--severity .act-flt-seg__btn--warning.is-active {
  color: var(--warn-text);
  border-color: var(--warn-border, rgba(234, 179, 8, 0.45));
  background: var(--warn-soft, rgba(234, 179, 8, 0.12));
  box-shadow: inset 0 0 0 1px var(--warn-border, rgba(234, 179, 8, 0.35));
}
.act-flt-seg--severity .act-flt-seg__btn--error.is-active {
  color: var(--danger-text);
  border-color: var(--danger-border, rgba(239, 68, 68, 0.45));
  background: var(--danger-soft, rgba(239, 68, 68, 0.1));
  box-shadow: inset 0 0 0 1px var(--danger-border, rgba(239, 68, 68, 0.35));
}
.act-flt-seg--status .act-flt-seg__btn--st-active.is-active {
  color: var(--blue-text);
  border-color: var(--blue-border);
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px var(--blue-border);
}
.act-flt-seg--status .act-flt-seg__btn--st-failed.is-active {
  color: var(--danger-text);
  border-color: var(--danger-border, rgba(239, 68, 68, 0.45));
  background: var(--danger-soft, rgba(239, 68, 68, 0.1));
  box-shadow: inset 0 0 0 1px var(--danger-border, rgba(239, 68, 68, 0.35));
}
.act-flt-pop__foot {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
}
.act-flt-pop__clear:disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.popover--act-dl {
  width: min(320px, calc(100vw - 24px));
  max-width: min(320px, calc(100vw - 24px));
  padding: 14px;
}
.act-dl-pop__title {
  margin: 0 0 12px;
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--text);
}
.act-dl-pop__grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 14px;
  font-size: var(--fs-12);
}
.act-dl-pop__label {
  font-weight: 600;
  color: var(--text-muted);
}
.act-dl-pop__value {
  font-weight: 600;
  color: var(--text);
  text-align: right;
}
.act-dl-pop__select { height: 32px; font-size: var(--fs-12); }

.act-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 10px;
  min-width: 0;
}
.act-toolbar__left,
.act-toolbar__right {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.act-toolbar__right { flex-shrink: 0; }
.act-period { width: auto; min-width: 72px; height: 32px; font-size: var(--fs-12); }

.act-split {
  display: grid;
  grid-template-columns: minmax(260px, 540px) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  min-width: 0;
  height: 560px;
}
.act-timeline-card,
.act-details {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.act-timeline-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.act-timeline-date {
  padding: 6px 10px 4px;
  font-size: var(--fs-11);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-soft);
}
.act-tl-row {
  display: grid;
  grid-template-columns: 62px 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 8px;
  width: 100%;
  min-height: 54px;
  padding: 7px 10px;
  border: none;
  border-bottom: 1px solid var(--border-soft);
  border-left: 3px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
}
.act-tl-row:hover { background: var(--hover); }
.act-tl-row.is-selected {
  background: var(--blue-soft);
  border-left-color: var(--blue);
}
.act-tl-row--spacer {
  min-height: 54px;
  border-bottom: 1px solid var(--border-soft);
  pointer-events: none;
}
.act-tl-row__time {
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.act-tl-row__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  flex: none;
}
.act-tl-row__icon .icon { width: 14px; height: 14px; }
.act-tl-row__icon--info { color: var(--blue); background: var(--blue-soft); }
.act-tl-row__icon--success { color: var(--ok-text); background: var(--ok-soft); }
.act-tl-row__icon--warning { color: var(--warn-text); background: var(--warn-soft); }
.act-tl-row__icon--error { color: var(--danger-text); background: var(--danger-soft); }
.act-tl-row__main { min-width: 0; }
.act-tl-row__title {
  display: block;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}
.act-tl-row__detail {
  display: block;
  margin-top: 1px;
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.3;
}
.act-tl-row__sev { flex: none; }
.act-tl-row__trail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  margin-left: 4px;
}
.act-tl-row__chev {
  display: inline-flex;
  color: var(--text-disabled);
  flex: none;
}
.act-tl-row__chev .icon { width: 14px; height: 14px; }

.act-timeline-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
  flex: none;
}
.act-timeline-pager__meta {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.act-timeline-pager__nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.act-timeline-pager__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
}
.act-timeline-pager__btn:hover:not(:disabled) {
  background: var(--hover);
  border-color: var(--border-strong);
  color: var(--text);
}
.act-timeline-pager__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.act-timeline-pager__btn .icon { width: 14px; height: 14px; }
.act-timeline-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 16px;
  font-size: var(--fs-13);
  color: var(--text-muted);
  text-align: center;
}
.act-timeline-empty__msg { margin: 0; }
.act-timeline-empty__clear { margin-top: 2px; }

.act-details {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

/* Event Inspector — two-column dense layout (fixed card, no scroll) */
.act-insp {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  container-type: inline-size;
  container-name: act-insp;
}
.act-insp__head {
  flex-shrink: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
}
.act-insp__head-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.act-insp__icon {
  width: 36px;
  height: 36px;
  flex: none;
}
.act-insp__icon .icon { width: 16px; height: 16px; }
.act-insp__head-main { flex: 1; min-width: 0; }
.act-insp__head-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.act-insp__title {
  margin: 0;
  font-size: var(--fs-14);
  font-weight: 650;
  color: var(--text);
  line-height: 1.2;
}
.act-insp__close { flex: none; width: 26px; height: 26px; margin: -2px -2px 0 0; }
.act-insp__summary {
  margin: 2px 0 0;
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.25;
}
.act-insp__body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 10px 12px;
}
/* Audit log: 10 rows plus date headers, and an inspector of up to 7
   sections, do not fit the fixed cards sized for the device Activity tab.
   Both scroll inside the card; the pager stays put. */
[data-aud-root] .act-timeline-list,
[data-aud-root] .act-insp__body {
  overflow-y: auto;
  overscroll-behavior: contain;
}
.act-insp__layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(168px, 0.85fr);
  gap: 12px 14px;
  height: 100%;
  min-height: 0;
  align-items: start;
}
.act-insp__main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.act-insp__aside {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.act-insp__aside-title {
  margin: 0;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.2;
}
.act-insp__aside-card {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 6px 10px;
}
.act-insp__aside-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-soft);
}
.act-insp__aside-row:last-child { border-bottom: none; }
.act-insp__aside-row .act-insp__value {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-12);
  font-weight: 600;
}
.act-insp__sevdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  flex: none;
}
.act-insp__sevdot--info { background: var(--blue); }
.act-insp__sevdot--warning { background: var(--warn-text); }
.act-insp__sevdot--error,
.act-insp__sevdot--critical { background: var(--danger-text); }
.act-insp__sevdot--success { background: var(--ok-text); }

.act-insp__card {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 10px 12px;
}
.act-insp__card--tech { margin-top: 6px; padding: 8px 10px; }

.act-insp__keyfacts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 10px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface-2);
}
.act-insp__keyfacts .act-insp__label { font-size: 10px; }
.act-insp__keyfacts .act-insp__value { font-size: var(--fs-12); font-weight: 650; }

.act-insp__section { margin: 0 0 8px; padding: 0; border: none; }
.act-insp__section:last-of-type { margin-bottom: 4px; }
.act-insp__section-title {
  margin: 0 0 5px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.2;
}

.act-insp__fields {
  display: grid;
  column-gap: 14px;
  row-gap: 8px;
  align-items: start;
}
.act-insp__fields + .act-insp__fields { margin-top: 8px; }
.act-insp__fields--1 { grid-template-columns: minmax(0, 1fr); }
.act-insp__fields--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.act-insp__fields--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.act-insp__fields--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.act-insp__field {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.act-insp__field--full { grid-column: 1 / -1; }
.act-insp__label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.2;
}
.act-insp__value {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  text-align: left;
  word-break: break-word;
}
.act-insp__value--strong { font-weight: 700; }
.act-insp__value--warn { color: var(--warn-text); }
.act-insp__value--danger { color: var(--danger-text); }
.act-insp__value--ok { color: var(--ok-text); }
.act-insp__copyable {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
}
.act-insp__copyable > .mono {
  min-width: 0;
  overflow-wrap: anywhere;
}
.act-insp__copyable .copy-btn {
  width: 18px;
  height: 18px;
  flex: none;
}

.act-insp__split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0 0 8px;
}
.act-insp__split .act-insp__section { margin-bottom: 0; }

.act-insp__ip-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 6px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface-2);
}
.act-insp__ip-side { min-width: 0; }
.act-insp__ip-val {
  display: block;
  margin-top: 1px;
  font-size: var(--fs-13);
  font-weight: 650;
  color: var(--text);
}
.act-insp__ip-arrow {
  color: var(--text-muted);
  font-size: var(--fs-14);
  font-weight: 500;
}
.act-insp__ip-new { color: var(--blue); }
.act-insp__ip-copy { width: 22px; height: 22px; }

.act-insp__url-card {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0 0 8px;
  padding: 7px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface-2);
}
.act-insp__url-value {
  font-size: var(--fs-11);
  font-weight: 500;
  color: var(--blue);
  word-break: break-all;
  line-height: 1.25;
}

.act-insp__attempts { display: flex; flex-direction: column; gap: 4px; }
.act-insp__attempt {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  font-size: var(--fs-11);
}
.act-insp__attempt-name { font-weight: 700; color: var(--text-muted); }
.act-insp__attempt-action { font-weight: 600; color: var(--text); }

.act-insp__tech {
  margin: 4px 0 0;
  padding-top: 6px;
  border-top: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.act-insp__tech-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--fs-11);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.act-insp__tech-summary::-webkit-details-marker { display: none; }
.act-insp__tech-chev {
  display: inline-flex;
  color: var(--text-muted);
  transition: transform 0.12s;
}
.act-insp__tech-chev .icon { width: 12px; height: 12px; }
.act-insp__tech[open] .act-insp__tech-summary { margin-bottom: 4px; color: var(--text); }
.act-insp__tech[open] .act-insp__tech-chev { transform: rotate(90deg); }

.act-insp__metrics-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: var(--fs-11);
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
}
.act-insp__metrics-link:hover { color: var(--blue); }
.act-insp__metrics-link .icon { width: 12px; height: 12px; }

.act-insp-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
}
.act-insp-empty__icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.act-insp-empty__icon .icon { width: 16px; height: 16px; }
.act-insp-empty strong {
  font-size: var(--fs-13);
  font-weight: 700;
  color: var(--text-secondary);
}
.act-insp-empty p {
  margin: 0;
  font-size: var(--fs-12);
  font-weight: 500;
  max-width: 220px;
  line-height: 1.4;
}
.act-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: auto;
}
.act-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-12);
}
.act-table th,
.act-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
.act-table th {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-2);
}
.act-table tr:last-child td { border-bottom: none; }
.act-usage-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
}

/* ============================================================
   Device > Diagnostics
   ============================================================ */
.diag-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.diag-head .ws-page__meta { margin-top: 4px; }

.diag-head__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text);
}

.diag-head__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}
.diag-head__dot--ok { background: var(--ok); }
.diag-head__dot--warn { background: var(--warn); }

.diag-run {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.diag-run .icon { width: 14px; height: 14px; }

.diag-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.diag-banner__main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.diag-banner__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
}
.diag-banner__icon--ok {
  background: color-mix(in srgb, var(--ok) 16%, transparent);
  color: var(--ok-text);
}
.diag-banner__icon .icon { width: 18px; height: 18px; }

.diag-banner__title {
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}
.diag-banner__sub {
  margin-top: 2px;
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--text-secondary);
}

.diag-banner__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  min-width: 0;
}

.diag-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.diag-stat__label {
  font-size: var(--fs-11);
  font-weight: 500;
  color: var(--text-muted);
}
.diag-stat__val {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.diag-stat__val--ok { color: var(--ok-text); }

.diag-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.diag-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}
.diag-card--app {
  grid-column: 1 / -1;
}

.diag-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
}

.diag-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.diag-card__title h3 {
  margin: 0;
  font-size: var(--fs-13);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.diag-card__ico {
  display: inline-flex;
  color: var(--blue);
}
.diag-card__ico .icon { width: 15px; height: 15px; }

.diag-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--fs-11);
  font-weight: 600;
  flex: none;
}
.diag-badge--ok {
  background: color-mix(in srgb, var(--ok) 14%, transparent);
  color: var(--ok-text);
}
.diag-badge--warn {
  background: color-mix(in srgb, var(--warn) 16%, transparent);
  color: var(--warn-text);
}
.diag-badge--muted,
.diag-badge--neutral {
  background: var(--hover);
  color: var(--text-muted);
}
/* Run steps: one pill per check, side by side, filled in as the phone
   answers. diag-steps, not diag-run: diag-run is the Run button. */
.diag-steps { margin-bottom: 12px; }
.diag-steps__track { height: 4px; background: var(--hover); }
.diag-steps__fill { height: 100%; background: var(--blue); transition: width 0.3s; }
.diag-steps__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 12px 14px;
}
.diag-steps__step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--fs-11);
  font-weight: 600;
  white-space: nowrap;
  background: var(--hover);
  color: var(--text-muted);
}
.diag-steps__mark { width: 6px; height: 6px; border-radius: 50%; flex: none; background: currentColor; }
.diag-steps__step--ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok-text); }
.diag-steps__step--warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn-text); }
.diag-steps__step--bad { background: var(--danger-soft); color: var(--danger-text); }
.diag-steps__step--pending .diag-steps__mark { background: var(--blue); animation: pulse 1.2s ease-in-out infinite; }

.diag-metric__value--muted { color: var(--text-muted); }
.diag-metric__foot {
  display: block;
  font-size: var(--fs-10);
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

.diag-banner--offline {
  background: color-mix(in srgb, var(--text-muted) 6%, var(--surface));
}
.diag-banner__icon--muted { color: var(--text-muted); }
.diag-banner__offline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 6px;
  font-size: var(--fs-11);
  color: var(--text-muted);
}
.diag-stat__val--muted { color: var(--text-muted); }

.diag-card--stale {
  opacity: 0.96;
}
.diag-card--stale .diag-card__body {
  color: var(--text-secondary);
}

.diag-head__dot--muted { background: var(--text-muted); }
.diag-perm--muted strong { color: var(--text-muted); }

.ws-presence-meta {
  margin-left: 10px;
  font-size: var(--fs-11);
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.act-usage-live--off {
  background: var(--hover);
  color: var(--text-muted);
}
.act-usage-ov__value--muted {
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--text-muted);
}

.ov-strip__live--off {
  color: var(--text-muted);
}
.ov-strip__live--off .ov-strip__live-dot {
  background: var(--text-muted);
  box-shadow: none;
}

.diag-card__body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 14px 12px;
  flex: 1;
  min-width: 0;
}
.diag-card__body--bars {
  gap: 10px;
  padding-top: 10px;
}

.diag-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-soft);
  min-width: 0;
}
.diag-metric:last-child { border-bottom: none; }
.diag-metric--spark { align-items: center; }

.diag-metric__label {
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--text-secondary);
  flex: 1;
  min-width: 0;
}
.diag-metric__value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
  flex: none;
}
.diag-metric__value--ok { color: var(--ok-text); }
.diag-metric__value--warn { color: var(--warn-text); }

.diag-spark {
  display: block;
  flex: none;
}

.diag-throughput {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}
.diag-throughput__label {
  display: block;
  font-size: var(--fs-11);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.diag-throughput__val {
  font-size: var(--fs-18);
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.diag-throughput__val--up { color: #7c3aed; }

.diag-proxy-stats {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed var(--border-soft);
}
.diag-proxy-stats .diag-metric { padding: 6px 0; }

.diag-card__foot {
  margin-top: auto;
  padding: 10px 14px;
  border-top: 1px solid var(--border-soft);
}

.diag-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  cursor: pointer;
  padding: 2px 0;
  border-radius: 2px;
}
.diag-link:hover { text-decoration: underline; }

.diag-bar__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.diag-bar__label {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text);
}
.diag-bar__meta {
  font-size: var(--fs-11);
  font-weight: 500;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.diag-bar__track {
  height: 5px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.diag-bar__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.diag-bar__fill--ok { background: var(--ok); }
.diag-bar__fill--warn { background: var(--warn); }

.diag-app-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 16px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}
.diag-app-top .diag-metric { border-bottom: none; padding: 6px 0; }

.diag-perms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}
.diag-perm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  font-size: var(--fs-12);
}
.diag-perm span {
  font-weight: 500;
  color: var(--text-secondary);
}
.diag-perm strong {
  font-weight: 600;
  color: var(--text);
}
.diag-perm--ok strong { color: var(--ok-text); }
.diag-perm--warn {
  border-color: color-mix(in srgb, var(--warn) 35%, var(--border-soft));
  background: color-mix(in srgb, var(--warn) 8%, var(--surface-2));
}
.diag-perm--warn strong { color: var(--warn-text); }
.diag-perm__fix {
  border: none;
  background: transparent;
  color: var(--blue);
  font-size: var(--fs-11);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  flex: none;
}
.diag-perm__fix:hover { text-decoration: underline; }

.diag-tech {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}
.diag-tech__summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.diag-tech__summary::-webkit-details-marker { display: none; }
.diag-tech__summary .icon { width: 14px; height: 14px; color: var(--text-muted); }
.diag-tech__summary .icon:last-child {
  margin-left: auto;
  transition: transform 0.15s ease;
}
.diag-tech[open] .diag-tech__summary .icon:last-child { transform: rotate(180deg); }
.diag-tech__body {
  padding: 0 14px 12px;
  border-top: 1px solid var(--border-soft);
}

@container ws-page (max-width: 1024px) {
  .diag-grid { grid-template-columns: 1fr 1fr; }
  .diag-card--network { grid-column: 1 / -1; }
  .diag-card--app { grid-column: 1 / -1; }
}

@container ws-page (max-width: 720px) {
  .diag-grid { grid-template-columns: 1fr; }
  .diag-card--network,
  .diag-card--app { grid-column: auto; }
  .diag-banner { flex-direction: column; align-items: flex-start; }
  .diag-app-top { grid-template-columns: 1fr; }
  .diag-perms { grid-template-columns: 1fr; }
  .diag-head .diag-run { width: 100%; justify-content: center; }
}

.diag-checks { display: flex; flex-direction: column; gap: 6px; }
.diag-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
}
.diag-check__name {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text);
}
.diag-check__result {
  font-size: var(--fs-12);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.diag-check--passed .diag-check__result { color: var(--ok-text); }
.diag-check--warning .diag-check__result { color: var(--warn-text); }
.diag-check--failed .diag-check__result { color: var(--danger-text); }

@container ws-page (max-width: 720px) {
  .ws-form-grid { grid-template-columns: 1fr; }
  .act-usage-stats { grid-template-columns: 1fr; }
  .act-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .act-period-bar { flex-wrap: wrap; align-items: flex-start; }
  .act-period-bar__dl { margin-left: auto; }
  .act-tl-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .act-tl-toolbar__left { width: 100%; flex: none; }
  .act-filter-select--events { flex: 1 1 auto; width: auto; min-width: 0; }
  .act-search-wrap { flex: 1 1 100%; width: 100%; max-width: none; }
}

@container ws-page (max-width: 960px) {
  .act-split:not(.act-split--details) .act-details { display: none; }
  .act-split.act-split--details .act-timeline-card { display: none; }
  .act-split.act-split--details .act-details { display: flex; }
  .act-split { grid-template-columns: 1fr; height: min(560px, 70vh); }
}

@container ws-page (max-width: 640px) {
  .act-summary { grid-template-columns: 1fr 1fr; }
  .act-period-bar { flex-direction: column; align-items: stretch; }
  .act-period-bar__main { flex-wrap: wrap; }
  .act-period-seg { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .act-period-bar__dl { width: 100%; justify-content: center; }
  .act-tl-toolbar__left { flex-wrap: nowrap; width: 100%; }
  .act-search-wrap { width: 100%; flex: 1 1 100%; max-width: none; }
  .popover--act-filters {
    width: min(320px, calc(100vw - 20px));
    max-width: min(320px, calc(100vw - 20px));
  }
  .act-flt-pop__head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .act-flt-pop__hint { white-space: normal; }
  .act-flt-seg__btn {
    flex: 1 1 calc(50% - 3px);
    min-width: calc(50% - 3px);
    justify-content: center;
    display: inline-flex;
    align-items: center;
  }
}

@container act-insp (max-width: 560px) {
  .act-insp__layout { grid-template-columns: 1fr; gap: 8px; }
  .act-insp__aside { order: 2; }
  .act-insp__fields--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .act-insp__fields--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .act-insp__split { grid-template-columns: 1fr; gap: 8px; }
  .act-insp__ip-hero { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .act-insp__ip-copy { display: none; }
}

@container act-insp (max-width: 360px) {
  .act-insp__fields--2,
  .act-insp__fields--3,
  .act-insp__fields--4 { grid-template-columns: minmax(0, 1fr); }
  .act-insp__keyfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================
   Device — administration surface (compact, above-the-fold)
   ============================================================ */
.dev-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  width: 100%;
  max-width: 1120px;
  padding-bottom: 4px;
  box-sizing: border-box;
}

.dev-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.dev-head__title {
  margin: 0;
  font-size: var(--fs-18, 18px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
}
.dev-head__sub {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.35;
  max-width: 56ch;
}
.dev-head__hint {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  flex: none;
  margin-top: 2px;
}

.dev-subnav {
  display: none;
}

.dev-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  min-width: 0;
  width: 100%;
}

.dev-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.dev-grid.dev-grid--solo {
  grid-template-columns: minmax(0, 1fr);
}

.dev-grid.dev-grid--solo > * {
  grid-column: 1 / -1;
  min-width: 0;
}

.dev-share-page {
  min-width: 0;
}

.dev-share-page .dev-card--share {
  height: auto;
}

.dev-mobile-nav {
  margin: 0 0 4px;
}

.dev-mobile-nav__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 4px 0;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
}

.dev-mobile-nav__back:hover {
  color: var(--text);
}

.dev-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 100%;
  min-height: 0;
  height: 100%;
  box-shadow: none;
  box-sizing: border-box;
}
.dev-card--share {
  height: 100%;
}
.dev-card__head { min-width: 0; width: 100%; flex: none; }
.dev-card__title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.dev-card__title .icon {
  width: 15px;
  height: 15px;
  color: var(--icon-secondary);
}
.dev-card__title--info {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.dev-card__title-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--text-on-blue);
  flex: none;
}
.dev-card__title-ico .icon {
  width: 13px;
  height: 13px;
  color: var(--text-on-blue);
}
.dev-card__desc {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.3;
}
.dev-card__muted {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
}
.dev-card__badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2, #f4f6f8);
  font-size: 10px;
  font-weight: 650;
  color: var(--text-secondary);
  vertical-align: middle;
}
.dev-help {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
}

.dev-api-secret-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.dev-api-masked {
  display: block;
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border-soft, var(--border));
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 550;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.04em;
}
.dev-api-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin: 10px 0 0;
}
.dev-api-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.dev-api-meta dt {
  font-size: 11px;
  font-weight: 550;
  color: var(--text-muted);
}
.dev-api-meta dd {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}
.dev-api-status {
  flex: none;
  font-size: 10px;
  font-weight: 700;
}
.dev-api-acts {
  display: none;
}
.dev-api-created {
  margin: 6px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.dev-api-regen {
  margin-top: 12px;
}
.dev-api-scope-hint {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
}

.dev-card--api,
.dev-card--fp {
  height: auto;
}
.dev-card--fp.is-disabled {
  opacity: 0.92;
}
.dev-card--fp.is-disabled .form-select:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}
.dev-fp-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin: 4px 0 0;
}
.dev-fp-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.dev-fp-meta dt {
  font-size: 11px;
  font-weight: 550;
  color: var(--text-muted);
}
.dev-fp-meta dd {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}
.dev-fp-acts {
  margin-top: 8px;
}

.dev-field { min-width: 0; }
.dev-label {
  display: block;
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}
.dev-input { width: 100%; }
.dev-card input.form-input,
.dev-card .form-select {
  min-height: 34px;
  height: 34px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 13px;
}
.dev-help {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.3;
}

.dev-field--notes { position: relative; }
.dev-notes {
  width: 100%;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px;
  padding: 6px 10px 16px;
  resize: none;
  line-height: 1.35;
  font-weight: 500;
  font-size: 13px;
}
.dev-notes__meta {
  position: absolute;
  right: 8px;
  bottom: 4px;
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.dev-server__select {
  width: 100%;
}
.dev-field--server { display: none; } /* Server moved to lifecycle action row */

.dev-save-row {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 4px;
}

.dev-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  min-width: 84px;
  padding: 1px 16px 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-on-blue);
}

.dev-save-btn:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--text-on-blue);
}

.dev-save-btn:active {
  background: var(--primary-active);
  border-color: var(--primary-active);
}

/* Shared access */
.dev-share__add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px auto;
  gap: 6px;
  min-width: 0;
  flex: none;
}
.dev-share__add .form-input,
.dev-share__add .form-select {
  min-height: 34px;
  height: 34px;
}
.dev-share__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  flex: none;
}
.dev-share__count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}
.dev-share__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 6px;
}
.dev-share__empty {
  margin: 0;
  padding: 12px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}
.dev-share__list {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  max-height: 120px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
  overflow-y: auto;
  background: var(--surface);
}
.dev-share__list.is-scroll {
  max-height: 148px;
}
.dev-share__row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 84px 64px 26px;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  height: 36px;
  padding: 0 8px;
  border-bottom: 1px solid var(--border-soft);
}
.dev-share__row:last-child { border-bottom: none; }
.dev-share__who {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.2;
}
.dev-share__email {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dev-share__name {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dev-share__role {
  height: 26px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}
.dev-share__when {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: right;
}
.dev-share__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--icon-muted);
  cursor: pointer;
}
.dev-share__remove:hover {
  background: var(--danger-soft);
  color: var(--danger-text);
}
.dev-share__remove .icon { width: 13px; height: 13px; }
.dev-share__more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex: none;
  align-self: flex-start;
}
.dev-share__more .icon { width: 13px; height: 13px; }

.dev-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-on-blue);
  flex: none;
}
.dev-avatar--t0 { background: #5b8def; }
.dev-avatar--t1 { background: #32c675; }
.dev-avatar--t2 { background: #e6a23c; }
.dev-avatar--t3 { background: #8b5cf6; }
.dev-avatar--t4 { background: #e15858; }

/* Reset / Delete rows — compact so both fit without scroll */
.dev-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.dev-action__copy {
  min-width: 0;
  flex: 1 1 auto;
  padding-right: 4px;
}
.dev-action__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.dev-action__desc {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.35;
}
.dev-action__chips {
  display: none; /* scope lives in confirm modal — saves vertical space */
}
.dev-chip {
  display: none;
}
.dev-action__btn {
  flex: none;
  align-self: center;
  white-space: nowrap;
  height: 28px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  gap: 5px;
}
.dev-action__btn .icon {
  width: 12px;
  height: 12px;
}

.dev-action__btn--warn {
  border-color: var(--warn);
  color: var(--text-on-blue);
  background: var(--warn);
}
.dev-action__btn--warn:hover {
  filter: brightness(0.96);
  border-color: var(--warn);
  color: var(--text-on-blue);
  background: var(--warn);
}

.dev-action--danger {
  border-color: var(--danger-border);
  background: color-mix(in srgb, var(--danger-soft) 55%, var(--surface));
}
.dev-action--danger .btn--danger {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--text-on-danger);
}
.dev-action--danger .btn--danger:hover {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
  color: var(--text-on-danger);
}

@container ws-page (max-width: 900px) {
  .dev-grid { grid-template-columns: 1fr; }
}

@container ws-page (max-width: 560px) {
  .dev-share__add { grid-template-columns: 1fr; }
  .dev-share__row {
    grid-template-columns: 26px minmax(0, 1fr) 26px;
    grid-template-rows: auto auto;
    height: auto;
    min-height: 0;
    padding: 7px 8px;
  }
  .dev-share__role { grid-column: 2; width: fit-content; }
  .dev-share__when { display: none; }
  .dev-share__remove { grid-column: 3; grid-row: 1 / span 2; }
  .dev-card--share { height: auto; }
}

@media (max-width: 767px) {
  .dev-page--mobile .dev-subnav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 4px;
    margin: 0 0 8px;
    padding: 0;
    border: none;
    background: transparent;
  }

  .dev-page--mobile .dev-subnav .ws-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 34px;
    padding: 0 10px;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    box-shadow: none;
  }

  .dev-page--mobile .dev-subnav .ws-tab.is-active {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--text);
    font-weight: 600;
  }

  .dev-page--mobile .dev-subnav .ws-tab.is-active::after {
    display: none;
  }

  .dev-page--mobile .dev-head__title {
    font-size: 16px;
  }

  .dev-page--mobile .dev-head__sub {
    font-size: 10px;
  }

  .dev-page--mobile .dev-card {
    padding: 12px;
  }

  .dev-page--mobile {
    max-width: none;
  }

  .dev-page--mobile .dev-action {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    gap: 8px;
  }

  .dev-page--mobile .dev-action__title {
    font-size: 12px;
  }

  .dev-page--mobile .dev-action__desc {
    font-size: 10px;
    line-height: 1.35;
  }

  .dev-page--mobile .dev-action__btn {
    height: 26px;
    padding: 0 8px;
    font-size: 10px;
    font-weight: 700;
  }

  .dev-page--mobile .dev-action__btn .icon {
    width: 11px;
    height: 11px;
  }

  .dev-page--mobile .dev-card--api .dev-card__title {
    font-size: 14px;
  }
  .dev-page--mobile .dev-card--api .dev-card__desc,
  .dev-page--mobile .dev-card--api .dev-api-scope-hint,
  .dev-page--mobile .dev-card--api .dev-card__muted {
    font-size: 11px;
  }
  .dev-page--mobile .dev-card--api .dev-api-masked {
    padding: 6px 8px;
    font-size: 11px;
  }
  .dev-page--mobile .dev-card--api .btn {
    height: 28px;
    padding: 0 10px;
    font-size: 11px;
  }

  .dev-page--mobile.dev-page--share .dev-card--share {
    height: auto;
  }

  .dev-page--mobile.dev-page--share .dev-share__body,
  .dev-page--mobile.dev-page--share .dev-share__list,
  .dev-page--mobile.dev-page--share .dev-share__empty {
    flex: none;
  }
}

/* Shared Access (instance-scoped) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.dev-share-mount {
  min-width: 0;
  height: 100%;
}
.sa-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
}
.sa-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.sa-card__title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--text);
}
.sa-card__title .icon { width: 16px; height: 16px; color: var(--text-muted); }
.sa-card__desc {
  margin: 4px 0 0;
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
}
.sa-summary {
  margin: 0;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text-secondary);
}
.sa-empty {
  padding: 18px 8px 8px;
  text-align: left;
}
.sa-empty__title {
  margin: 0 0 6px;
  font-size: var(--fs-14);
  font-weight: 700;
}
.sa-empty__desc {
  margin: 0 0 12px;
  font-size: var(--fs-12);
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 36em;
}
.sa-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.sa-table__head,
.sa-table__row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 0.7fr 0.6fr 0.55fr 36px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
}
.sa-table__head {
  background: var(--surface-2, var(--bg));
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.sa-table__row {
  border-top: 1px solid var(--border-soft);
  font-size: var(--fs-12);
}
.sa-table__row:hover { background: var(--hover); }
.sa-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sa-user__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.sa-user__email {
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sa-user__name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sa-access { font-weight: 600; color: var(--text-secondary); }
.sa-added { color: var(--text-muted); font-weight: 500; }
.sa-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid var(--border);
}
.sa-badge.is-active {
  background: var(--ok-soft);
  color: var(--ok-text);
  border-color: var(--ok-border);
}
.sa-badge.is-pending {
  background: var(--warn-soft, #fff7e8);
  color: var(--warn-text, #9a6700);
  border-color: var(--warn-border, #f0d9a0);
}
.sa-menu-btn .icon { width: 16px; height: 16px; }
.sa-configure-btn { margin-top: 8px; }

/* Access level cards */
.sa-roles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.sa-role {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.sa-role:hover { background: var(--hover); }
.sa-role:focus-visible {
  outline: 2px solid var(--focus-ring, var(--blue));
  outline-offset: 2px;
}
.sa-role.is-selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 1px var(--blue);
}
.sa-role.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.sa-role__radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex: none;
  margin-top: 2px;
  position: relative;
  background: var(--surface);
}
.sa-role.is-selected .sa-role__radio {
  border-color: var(--blue);
}
.sa-role.is-selected .sa-role__radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--blue);
}
.sa-role__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sa-role__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sa-role__title {
  font-size: var(--fs-13);
  font-weight: 700;
  color: var(--text);
}
.sa-role__view {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  flex: none;
}
.sa-role__view:hover { text-decoration: underline; }
.sa-role__desc {
  margin: 0;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.35;
}
.sa-role__summary {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}
.sa-role__configure {
  margin-top: 6px;
  align-self: flex-start;
}
.sa-role-hint {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
}
.sa-custom-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface-2, var(--bg));
}
.sa-custom-summary__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sa-custom-summary__label {
  font-size: var(--fs-12);
  font-weight: 700;
  color: var(--text);
}
.sa-custom-summary__count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Share device access — compact email + access form */
.sa-share-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sa-share-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  position: relative;
}
.sa-share-form__count {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 11px;
  font-weight: 650;
  color: var(--text-muted);
}
.sa-share-form__hint,
.sa-access-desc,
.sa-share-form__foot-note {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}
.sa-share-form__error {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--danger);
}
.sa-share-form__foot-note {
  padding-top: 4px;
  border-top: 1px solid var(--border-soft);
}

.sa-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sa-chip {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.sa-chip__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sa-chip__email {
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  word-break: break-all;
}
.sa-chip__hint {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.sa-chip__hint--ok { color: var(--ok-text, var(--ok)); }
.sa-chip__remove {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.sa-chip__remove:hover {
  background: var(--hover);
  color: var(--text);
}
.sa-chip__remove .icon { width: 14px; height: 14px; }

.sa-existing {
  padding: 8px 10px;
  border: 1px solid var(--warn-border, var(--border));
  border-radius: var(--radius-sm);
  background: var(--warn-soft, var(--surface-2));
}
.sa-existing__line {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  color: var(--text);
}
.sa-existing__line + .sa-existing__line { margin-top: 4px; }
.sa-existing__hint {
  margin: 6px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.sa-access-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.sa-access-summary__meta { min-width: 0; width: 100%; }
.sa-access-summary__count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.sa-access-summary__desc {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}
.sa-access-summary__match {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.sa-access-summary__use {
  margin-left: 6px;
  padding: 0;
  border: none;
  background: none;
  color: var(--blue);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.sa-access-summary__use:hover { text-decoration: underline; }

.sa-user__name {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
}
.sa-user__email {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Configure permissions — legacy modal styles removed; see .sa-pdraw in drawer.css */

.modal--sa-share .modal__panel,
.modal--sa-edit .modal__panel {
  max-width: 480px;
}
.modal--sa-share .modal__body,
.modal--sa-edit .modal__body {
  max-height: min(70vh, 560px);
  overflow: auto;
}

@media (max-width: 720px) {
  .sa-table__head { display: none; }
  .sa-table__row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "user acts"
      "access status"
      "added added";
    row-gap: 6px;
  }
  .sa-user { grid-area: user; }
  .sa-acts { grid-area: acts; justify-self: end; }
  .sa-access { grid-area: access; }
  .sa-status { grid-area: status; justify-self: end; }
  .sa-added { grid-area: added; }
  .modal--sa-share .modal__panel,
  .modal--sa-edit .modal__panel {
    width: 100%;
    max-width: 100%;
    max-height: 96vh;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }
  .sa-custom-summary {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ============================================================
   Plan — device subscription + renew
   ============================================================ */
.plan-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  width: 100%;
  max-width: 1120px;
  padding-bottom: 8px;
  box-sizing: border-box;
}

.plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.plan-head__title {
  margin: 0;
  font-size: var(--fs-18, 18px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
}
.plan-head__sub {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.35;
}
.plan-help-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 31px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  flex: none;
  white-space: nowrap;
}
.plan-help-btn .icon {
  width: 14px;
  height: 14px;
  color: var(--icon-secondary);
}
.plan-help-btn:hover {
  color: var(--text);
  border-color: var(--border-strong, var(--border));
  background: var(--hover);
}
.plan-help-btn:hover .icon { color: var(--icon); }
.plan-help-btn:focus-visible { box-shadow: var(--focus-ring); outline: none; }

.plan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
  width: 100%;
}

.plan-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 16px 18px;
  min-width: 0;
}

/* Left — plan info */
.plan-info__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.plan-info__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.plan-info__name {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.plan-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
}
.plan-badge--warn {
  background: var(--warn-soft);
  color: var(--warn-text);
}
.plan-badge--ok {
  border-color: var(--ok-border);
  background: var(--ok-soft);
  color: var(--ok-text);
}
.plan-badge--danger {
  border-color: var(--danger-border);
  background: var(--danger-soft);
  color: var(--danger-text);
}
.plan-info__expires {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}
.plan-info__price {
  text-align: right;
  flex: none;
  white-space: nowrap;
  padding-top: 2px;
}
.plan-info__price-amt {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.plan-info__price-unit {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.plan-info__desc {
  margin: 10px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}

.plan-feats {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.plan-feat {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--border-soft);
}
.plan-feat:first-child { border-top: none; padding-top: 2px; }
.plan-feat__ico {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 999px;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.plan-feat__ico .icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.25;
}
.plan-feat__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}
.plan-feat__desc {
  margin-top: 1px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Right — renew */
.plan-card--renew {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}
.plan-renew__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.plan-renew__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.plan-renew__balance {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}
.plan-renew__balance span {
  color: var(--blue);
  font-weight: 700;
}

.plan-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.plan-seg__btn {
  height: 34px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.plan-seg__btn + .plan-seg__btn { border-left: 1px solid var(--border-soft); }
.plan-seg__btn:hover { color: var(--text); background: var(--hover); }
.plan-seg__btn.is-active {
  background: var(--blue);
  color: var(--text-on-blue);
}
.plan-seg__btn:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--blue-soft); }

.plan-coupon { display: flex; flex-direction: column; gap: 8px; }
.plan-coupon__row {
  display: flex;
  gap: 8px;
  min-width: 0;
}
.plan-coupon__input {
  flex: 1;
  min-width: 0;
  height: 34px;
  min-height: 34px;
}
.plan-coupon__apply {
  height: 34px;
  flex: none;
}
.plan-coupon__applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.plan-coupon__tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ok-text);
  min-width: 0;
}
.plan-coupon__tag .icon {
  width: 13px;
  height: 13px;
  color: var(--ok-text);
}
.plan-coupon__remove {
  border: none;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  flex: none;
}
.plan-coupon__remove:hover { text-decoration: underline; }

.plan-quote {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 2px;
}
.plan-quote__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}
.plan-quote__row strong {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.plan-quote__row--disc,
.plan-quote__row--disc strong {
  color: var(--ok-text);
}
.plan-quote__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.plan-quote__total strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.plan-renew__cta {
  width: 100%;
  height: 38px;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

/* Purchase confirm: a small card over the button, quiet by design. */
.popover--plan-confirm {
  width: min(260px, calc(100vw - 24px));
  padding: 12px;
}
.plan-confirm { display: flex; flex-direction: column; gap: 6px; }
.plan-confirm__title { font-size: 13px; font-weight: 600; color: var(--text); }
.plan-confirm__row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}
.plan-confirm__row strong {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.plan-confirm__note { margin: 0; font-size: 12px; color: var(--text-secondary); }
.plan-confirm__actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 4px; }

.plan-auto { display: flex; flex-direction: column; gap: 4px; }
.plan-auto__row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.plan-auto__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-right: auto;
}
.plan-auto__hint {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.plan-auto__desc {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}

.plan-info-strip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.plan-info-strip__ico {
  color: var(--icon-secondary);
  flex: none;
  margin-top: 1px;
}
.plan-info-strip__ico .icon { width: 14px; height: 14px; }
.plan-info-strip__text {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}
.plan-info-strip__link {
  border: none;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}
.plan-info-strip__link:hover { text-decoration: underline; }

/* Billing help modal */
.modal__panel.modal__panel--plan-help {
  width: 470px;
}
.modal__head--stacked {
  align-items: flex-start;
  flex-wrap: wrap;
  column-gap: 12px;
  row-gap: 2px;
  padding-bottom: 0;
}
.modal__head--stacked h2 {
  font-size: 15px;
  font-weight: 600;
  order: 1;
}
.modal__head--stacked .modal__close {
  order: 2;
  margin-left: auto;
  position: relative;
  z-index: 2;
  flex: none;
}
.plan-help__subhead {
  order: 3;
  width: 100%;
  margin: 0;
  padding-right: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.35;
}
.plan-help { padding-top: 8px; }
.plan-help__lead {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}
.plan-help__rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.plan-help__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.plan-help__ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  color: var(--icon-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.plan-help__ico .icon { width: 14px; height: 14px; }
.plan-help__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}
.plan-help__desc {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}
.plan-help__flow {
  margin: 16px 0 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}
.plan-help__flow span {
  color: var(--text-secondary);
  margin: 0 3px;
}

.plan-fund__rows {
  margin: 12px 0 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.plan-fund__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-soft);
}
.plan-fund__row:last-child { border-bottom: none; }
.plan-fund__row strong {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.plan-fund__need { color: var(--warn-text) !important; }
.plan-fund__input {
  display: flex;
  align-items: center;
  gap: 6px;
}
.plan-fund__prefix {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

@container ws-page (max-width: 860px) {
  .plan-grid { grid-template-columns: 1fr; }
}

@container ws-page (max-width: 520px) {
  .plan-head {
    flex-wrap: wrap;
    align-items: center;
  }
  .plan-help-btn { margin-left: auto; }
  .plan-info__top { flex-direction: column; }
  .plan-info__price { text-align: left; }
}

@media (max-width: 767px) {
  .plan-page--mobile .plan-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .plan-page--mobile .plan-card {
    width: 100%;
    position: static;
    box-sizing: border-box;
  }

  .plan-page--mobile .plan-card--renew {
    order: 1;
  }

  .plan-page--mobile .plan-card--info {
    order: 2;
  }

  .plan-page--mobile .plan-head {
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  .plan-page--mobile .plan-help-btn {
    margin-left: auto;
  }

  .plan-page--mobile .plan-summary--renew {
    padding-bottom: 12px;
    margin-bottom: 2px;
    border-bottom: 1px solid var(--border-soft);
  }

  .plan-page--mobile .plan-summary--renew .plan-info__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .plan-page--mobile .plan-summary--renew .plan-info__price {
    text-align: left;
  }

  .plan-page--mobile .plan-renew__head {
    flex-wrap: wrap;
    gap: 6px;
  }

  .plan-page--mobile .plan-renew__balance {
    white-space: normal;
  }
}

/* ============================================================
   Mobile workspace — focused full-screen connection view
   ============================================================ */
@media (max-width: 767px) {
  .app.is-workspace .main,
  .app.is-workspace #view-outlet {
    padding: 0 !important;
  }

  .app.is-workspace .content,
  .app.is-workspace .app-main {
    padding-top: env(safe-area-inset-top, 0px) !important;
  }

  .app.is-workspace #view-outlet:has(> .ws-header) > #ws-content {
    padding: 8px 12px 24px;
  }

  .ws-header--mobile {
    position: sticky;
    top: 0;
    z-index: calc(var(--z-sidebar) + 2);
    width: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--border-soft);
  }

  .ws-header--mobile .ws-toolbar--desktop,
  .ws-header--mobile .ws-tabs {
    display: none !important;
  }

  .ws-toolbar--mobile {
    width: 100%;
    min-width: 0;
  }

  .ws-toolbar__mobile-head {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0;
    box-sizing: border-box;
  }

  .ws-tab-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 48px;
    padding: 0;
    margin: 0 0 0 -14px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--icon);
    cursor: pointer;
  }
  .ws-tab-menu .icon {
    width: 18px;
    height: 18px;
  }
  .ws-tab-menu:active { background: var(--hover); }

  .ws-mobile-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0 44px 0 0;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ws-mobile-meta::-webkit-scrollbar { display: none; }

  .ws-mobile-meta__name,
  .ws-mobile-meta__id {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    padding: 2px 4px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    font: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .ws-mobile-meta__name {
    flex: 0 0 auto;
    overflow: visible;
    font-weight: 600;
    color: var(--text);
  }
  .ws-mobile-meta__id {
    flex: 0 0 auto;
    overflow: visible;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: -0.03em;
    color: var(--text-secondary);
  }
  .ws-mobile-meta__name:active,
  .ws-mobile-meta__id:active,
  .ws-mobile-meta__name.is-copied,
  .ws-mobile-meta__id.is-copied {
    background: var(--blue-soft);
    color: var(--blue);
  }
  .ws-mobile-meta__name.is-copied .ws-idcopy__text,
  .ws-mobile-meta__id.is-copied .ws-idcopy__text {
    color: inherit;
  }
  .ws-mobile-meta__sep {
    flex: none;
    color: var(--text-muted);
    font-weight: 300;
    font-size: 9px;
  }
  .ws-mobile-meta__status {
    flex: 0 0 auto;
    overflow: visible;
    font-weight: 400;
    font-size: 11px;
  }
  .ws-mobile-meta__status--ok { color: var(--ok); }
  .ws-mobile-meta__status--warn { color: var(--warn); }
  .ws-mobile-meta__status--danger { color: var(--danger); }
  .ws-mobile-meta__status--neutral { color: var(--text-secondary); }

  .ws-close {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 48px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--icon-secondary);
    cursor: pointer;
    z-index: 2;
  }
  .ws-close .icon { width: 20px; height: 20px; }
  .ws-close:active { background: var(--hover); }

  /* Left sections drawer */
  .ws-nav-drawer {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-drawer) + 2);
    pointer-events: none;
  }
  .ws-nav-drawer.is-open { pointer-events: auto; }

  .ws-nav-drawer__backdrop {
    position: absolute;
    inset: 0;
    border: none;
    padding: 0;
    background: var(--backdrop-soft);
    opacity: 0;
    transition: opacity 0.18s ease;
    cursor: pointer;
  }
  .ws-nav-drawer.is-open .ws-nav-drawer__backdrop { opacity: 1; }

  .ws-nav-drawer__panel {
    position: absolute;
    top: 0;
    left: 0;
    width: min(288px, calc(100vw - 48px));
    max-width: 100%;
    height: 100%;
    padding-top: env(safe-area-inset-top, 0px);
    background: var(--surface-elevated, var(--surface));
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-drawer);
    display: flex;
    flex-direction: column;
    transform: translateX(-105%);
    transition: transform 0.18s ease;
    box-sizing: border-box;
  }
  .ws-nav-drawer.is-open .ws-nav-drawer__panel { transform: translateX(0); }

  .ws-nav-drawer__head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 18px 16px 14px;
    border-bottom: 1px solid var(--border-soft);
  }
  .ws-nav-drawer__label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
  }
  .ws-nav-drawer__name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ws-nav-drawer__list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    overflow-y: auto;
  }

  .ws-nav-drawer__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
  }
  .ws-nav-drawer__item-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  .ws-nav-drawer__item .ws-tab__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: inherit;
  }
  .ws-nav-drawer__item .ws-tab__icon .icon {
    width: 18px;
    height: 18px;
    display: block;
  }
  .ws-nav-drawer__item:hover { background: var(--hover); }
  .ws-nav-drawer__item.is-active {
    background: var(--primary-soft, rgba(37, 99, 235, 0.1));
    color: var(--primary);
  }

  .ws-nav-drawer__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--surface-2, var(--bg));
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
  }
  .ws-nav-drawer__item.is-active .ws-nav-drawer__badge {
    background: rgba(37, 99, 235, 0.14);
    color: var(--primary);
  }
}

@media (min-width: 768px) {
  .ws-toolbar--mobile,
  .ws-nav-drawer,
  .ws-tab-menu,
  .ws-close,
  .ws-mobile-meta { display: none !important; }
}

/* ============================================================
   Proxy & Ports — mobile-only compact layout
   ============================================================ */
@media (max-width: 767px) {
  .pp-page--mobile {
    overflow-x: hidden;
    min-width: 0;
    width: 100%;
  }

  .pp-page--mobile .pp-top {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
    row-gap: 8px;
  }

  .pp-page--mobile .pp-top__end {
    width: 100%;
    padding-top: 0;
    order: -1;
    justify-content: stretch;
  }

  .pp-page--mobile .pp-tlogs-btn {
    width: 100%;
    height: 36px;
  }

  .pp-page--mobile .pp-head__titles {
    padding-left: 0;
    padding-top: 0;
    gap: 2px;
  }

  .pp-page--mobile .pp-title {
    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
  }

  .pp-page--mobile .pp-head__meta {
    font-size: 10px;
    line-height: 1.25;
    font-weight: 400;
  }

  .pp-page--mobile .pp-top__main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    min-width: 0;
  }

  .pp-page--mobile .pp-section-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: none;
    height: 40px;
    margin: 0;
    padding: 0;
    position: static;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    scrollbar-width: none;
  }
  .pp-page--mobile .pp-section-nav::-webkit-scrollbar {
    display: none;
  }

  .pp-page--mobile .pp-section-nav__btn {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 0 auto;
    width: auto;
    min-width: 0 !important;
    min-height: 0;
    height: 100%;
    padding: 0 10px !important;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    hyphens: manual;
    word-break: normal;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
    box-sizing: border-box;
    box-shadow: none;
  }

  .pp-page--mobile .pp-section-nav__ico {
    width: 15px;
    height: 15px;
  }
  .pp-page--mobile .pp-section-nav__ico .icon {
    width: 15px;
    height: 15px;
  }

  .pp-page--mobile .pp-section-nav__btn.is-active {
    background: transparent;
    border-color: transparent;
    color: var(--blue);
    font-weight: 600;
  }

  .pp-page--mobile .pp-section-nav__btn.is-active::after {
    display: block;
    left: 8px;
    right: 8px;
    bottom: -1px;
    height: 2px;
  }

  .pp-page--mobile .pp-section-nav__btn:not(.is-active) {
    border-color: transparent;
    color: var(--text-secondary);
    background: transparent;
  }

  .pp-page--mobile .pp-section-nav__btn:active {
    background: transparent;
  }

  .pp-page--mobile .pp-toolbar {
    width: 100%;
    max-width: 100%;
    margin-top: 0;
  }

  .pp-page--mobile .pp-toolbar__cluster,
  .pp-page--mobile .pp-toolbar__cluster--mobile {
    width: 100%;
  }

  .pp-page--mobile .pp-toolbar__cluster--mobile {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .pp-page--mobile .pp-gp-mobile-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: inherit;
    font: inherit;
    text-align: left;
    white-space: normal;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  .pp-page--mobile .pp-gp-mobile-btn__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--blue-soft-2);
    color: var(--blue);
  }
  .pp-page--mobile .pp-gp-mobile-btn__ico .icon {
    width: 20px;
    height: 20px;
  }

  .pp-page--mobile .pp-gp-mobile-btn__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .pp-page--mobile .pp-gp-mobile-btn__head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  .pp-page--mobile .pp-gp-mobile-btn__label {
    flex: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--text);
  }

  .pp-page--mobile .pp-gp-mobile__desc {
    display: block;
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--text-secondary);
    text-align: left;
  }

  .pp-page--mobile .pp-gp-mobile-btn__chev {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 20px;
    height: 20px;
    color: var(--icon-muted);
  }
  .pp-page--mobile .pp-gp-mobile-btn__chev .icon {
    width: 18px;
    height: 18px;
  }

  .pp-page--mobile .pp-gp-mobile-btn.is-active {
    background: var(--surface);
    border-color: var(--border-strong);
    box-shadow: 0 0 0 2px var(--blue-border);
  }

  .pp-page--mobile .pp-gp-mobile-btn:active {
    background: var(--hover);
  }

  .pp-page--mobile .pp-gp-mobile-btn .pp-gp__badge {
    flex: none;
    font-size: 11px;
    font-weight: 500;
    height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--neutral-soft);
    color: var(--neutral-text);
    border: none;
  }
  .pp-page--mobile .pp-gp-mobile-btn .pp-gp__badge.is-on {
    background: var(--ok-soft);
    color: var(--ok-text);
  }

  .pp-page--mobile .pp-global {
    display: none !important;
  }

  .pp-page--mobile .pp-toolbar .btn--sm {
    width: 100%;
    justify-content: center;
    min-height: 36px;
    height: 36px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
  }

  .pp-page--mobile .pp-toolbar .btn--primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-blue);
  }

  .pp-page--mobile .pp-sort,
  .pp-page--mobile [data-pp-copy-all] {
    display: none !important;
  }

  .pp-page--mobile .pp-global {
    padding-top: 0;
  }

  .pp-page--mobile .pp-gp {
    padding: 8px 10px;
    gap: 8px;
    border-radius: 10px;
  }

  .pp-page--mobile .pp-gp__head {
    gap: 8px;
    align-items: center;
  }

  .pp-page--mobile .pp-gp__icon {
    width: 22px;
    height: 22px;
  }

  .pp-page--mobile .pp-gp__icon .icon {
    width: 12px;
    height: 12px;
  }

  .pp-page--mobile .pp-gp__title {
    font-size: 12px;
    font-weight: 600;
  }

  .pp-page--mobile .pp-gp__badge {
    font-size: 9px;
    padding: 1px 6px;
  }

  .pp-page--mobile .pp-gp__desc {
    font-size: 10px;
    line-height: 1.25;
    margin: 0;
  }

  .pp-page--mobile .pp-gp__head-acts .btn--sm {
    min-height: 28px;
    height: 28px;
    padding: 0 8px;
    font-size: 11px;
  }

  .pp-page--mobile .pp-gp__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 8px;
  }

  .pp-page--mobile .pp-gp__stat-label {
    font-size: 9px;
    font-weight: 500;
  }

  .pp-page--mobile .pp-gp__stat-value {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
  }

  .pp-page--mobile .pp-gp__stat-sub {
    font-size: 9px;
  }

  .pp-page--mobile .pp-gpe {
    padding: 10px;
    border-radius: 10px;
  }

  .pp-page--mobile .pp-gpe__title {
    font-size: 14px;
  }

  .pp-page--mobile .pp-gpe__desc,
  .pp-page--mobile .pp-gpe__card-hint,
  .pp-page--mobile .pp-gpe__label {
    font-size: 10px;
  }

  .pp-page--mobile .pp-gpe__card {
    padding: 8px 10px;
  }

  .pp-page--mobile .pp-gpe__card-title {
    font-size: 11px;
  }

  .pp-page--mobile .pp-gpe__footer {
    gap: 8px;
  }

  .pp-page--mobile .pp-gpe__footer .btn--sm {
    min-height: 34px;
    font-size: 12px;
  }

  .pp-page--mobile .pp-list {
    border: none;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  .pp-page--mobile .pp-rows--mcard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 0 10px;
  }

  .pp-page--mobile .pp-row--mcard {
    border: none;
    background: transparent;
  }

  .pp-page--mobile .pp-row--mcard.is-selected .pp-mcard {
    border-color: var(--blue-border);
    background: var(--selected);
    box-shadow:
      0 0 0 1px var(--blue-border-soft),
      0 4px 12px rgba(37, 99, 235, 0.1);
  }

  .pp-page--mobile .pp-mcard {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow:
      0 1px 2px rgba(15, 23, 42, 0.05),
      0 4px 12px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    isolation: isolate;
  }

  .pp-page--mobile .pp-mcard__top {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 0;
    min-height: 0;
    padding: 12px 68px 12px 12px;
    box-sizing: border-box;
  }

  .pp-page--mobile .pp-mcard__row1 {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .pp-page--mobile .pp-mcard__check {
    flex: none;
    margin: 0;
    line-height: 0;
  }

  .pp-page--mobile .pp-mcard__check input {
    width: 14px;
    height: 14px;
    margin: 0;
    display: block;
  }

  .pp-page--mobile .pp-mcard__headline {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
    flex-wrap: wrap;
  }

  .pp-page--mobile .pp-mcard__headline .pp-dot {
    width: 8px;
    height: 8px;
    margin: 0;
    flex: none;
  }

  .pp-page--mobile .pp-mcard__proto {
    flex: none;
    font-size: var(--fs-12);
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.2;
    font-family: var(--font);
  }

  .pp-page--mobile .pp-mcard__headline .pp-policy-icos {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }

  .pp-page--mobile .pp-mcard__line {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
    width: 100%;
    line-height: 1.3;
    text-align: left;
    overflow: hidden;
  }

  .pp-page--mobile .pp-mcard__line--endpoint {
    margin-top: 11px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .pp-page--mobile .pp-mcard__host,
  .pp-page--mobile .pp-mcard__portnum {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  }

  .pp-page--mobile .pp-mcard__host {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pp-page--mobile .pp-mcard__portnum {
    flex: none;
  }

  .pp-page--mobile .pp-mcard__sep {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    flex: none;
  }

  .pp-page--mobile .pp-mcard__line--cred {
    margin-top: 3px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-secondary);
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
  }

  .pp-page--mobile .pp-mcard__desc {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 400;
    font-family: var(--font);
    color: var(--text-secondary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
    text-align: left;
    width: 100%;
  }

  .pp-page--mobile .pp-mcard__actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    position: absolute;
    top: 8px;
    right: 6px;
    z-index: 1;
  }

  .pp-page--mobile .pp-mcard__icon-btn {
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--icon-secondary);
    box-shadow: none;
  }

  .pp-page--mobile .pp-mcard__icon-btn:hover {
    background: var(--hover);
    color: var(--icon);
  }

  .pp-page--mobile .pp-mcard__icon-btn .icon {
    width: 14px;
    height: 14px;
  }

  .pp-page--mobile .pp-mcard__icon-btn--danger:hover {
    color: var(--danger);
    background: var(--danger-soft);
  }

  .pp-page--mobile .pp-mcard__expire {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    min-height: 0;
    padding: 8px 12px;
    background: var(--surface-2);
    border-top: 1px solid var(--border-soft);
    font-size: 11px;
    font-weight: 500;
    font-family: var(--font);
    color: var(--text-secondary);
    line-height: 1.25;
  }

  .pp-page--mobile .pp-mcard__expire .icon {
    width: 12px;
    height: 12px;
    flex: none;
    color: var(--icon-muted);
  }

  .pp-page--mobile .pp-mcard-expiry {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
    font-size: 11px;
    font-weight: 500;
    font-family: var(--font);
  }

  .pp-page--mobile .pp-mcard__expire.expiry--danger,
  .pp-page--mobile .pp-mcard-expiry.expiry--danger {
    color: var(--danger);
  }

  .pp-page--mobile .pp-mcard__expire.expiry--warn,
  .pp-page--mobile .pp-mcard-expiry.expiry--warn {
    color: var(--warn);
  }

  .pp-page--mobile .pp-row__line,
  .pp-page--mobile .pp-row__compact {
    display: none !important;
  }

  .pp-page--mobile .pp-mcard__line--vpn-meta {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.4;
  }

  .pp-page--mobile .pp-row--vpn .pp-mcard__top {
    min-height: 0;
    padding-bottom: 12px;
  }

  .pp-page--mobile .pp-vpn,
  .pp-page--mobile .pp-ipurl {
    min-width: 0;
    overflow-x: hidden;
  }

  .pp-page--mobile .pp-editor__tlogs {
    flex-wrap: wrap;
  }

  .pp-page--mobile .pp-ipurl__list {
    width: 100%;
    max-width: none;
    gap: 2px;
  }

  .pp-page--mobile .pp-ipurl__hint {
    font-size: 12px;
    margin-bottom: 2px;
  }

  .pp-page--mobile .pp-ipurl-row {
    width: 100%;
    padding: 6px 0;
    gap: 6px;
  }

  .pp-page--mobile .pp-ipurl-row__num {
    font-size: 10px;
    margin-top: 2px;
  }

  .pp-page--mobile .pp-ipurl-row__url {
    font-size: 11px;
    line-height: 1.35;
  }

  .pp-page--mobile .pp-ipurl-row__acts {
    gap: 0;
    margin-top: 0;
  }

  .pp-page--mobile .pp-ipurl-row__acts .pp-ico-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--icon-secondary);
    box-shadow: none;
  }

  .pp-page--mobile .pp-ipurl-row__acts .pp-ico-btn .icon {
    width: 14px;
    height: 14px;
  }

  .pp-page--mobile .pp-ipurl-row__acts .pp-ico-btn:hover {
    background: var(--hover);
    border: none;
    color: var(--icon);
  }

  .pp-page--mobile .pp-ipurl-row__acts .pp-ico-btn:disabled {
    background: transparent;
    border: none;
    color: var(--text-disabled);
  }

  .pp-page--mobile .pp-ipurl-row__acts .pp-ico-btn.is-copied {
    color: var(--blue);
    background: transparent;
    border: none;
  }

  .pp-page--mobile .pp-ipurl-row__acts .pp-ico-btn--danger {
    color: var(--icon-secondary);
    background: transparent;
    border: none;
  }

  .pp-page--mobile .pp-ipurl-row__acts .pp-ico-btn--danger:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.06);
  }

  .pp-page--mobile .pp-composer,
  .pp-page--mobile .pp-composer .card {
    padding: 10px;
  }

  .pp-page--mobile .pp-composer .btn--sm {
    min-height: 34px;
    font-size: 12px;
  }

  .pp-page--mobile .pp-bulk-bar {
    overflow: visible;
  }

  .pp-page--mobile .pp-bulk--mobile-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-sizing: border-box;
  }

  .pp-page--mobile .pp-bulk--mobile-toolbar .pp-bulk__count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pp-page--mobile .pp-bulk__count-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
  }

  .pp-page--mobile .pp-bulk__count-check .icon {
    width: 11px;
    height: 11px;
  }

  .pp-page--mobile .pp-bulk--mobile-toolbar .pp-bulk__acts {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 0;
  }

  .pp-page--mobile .pp-bulk__exp {
    height: 34px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    background: var(--surface);
    border-color: var(--border);
  }

  .pp-page--mobile .pp-bulk__exp .icon {
    width: 14px;
    height: 14px;
  }

  .pp-page--mobile .pp-bulk__exp-short {
    display: none;
  }

  .pp-page--mobile .pp-bulk__more {
    flex: 0 0 34px;
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    height: 34px;
    padding: 0;
    background: var(--surface);
    border-color: var(--border);
  }

  .pp-page--mobile .pp-bulk__more .icon {
    width: 16px;
    height: 16px;
  }

  @media (max-width: 380px) {
    .pp-page--mobile .pp-bulk__exp-full {
      display: none;
    }
    .pp-page--mobile .pp-bulk__exp-short {
      display: inline;
    }
  }

  .pp-page--mobile .pp-bulk-panel {
    margin-top: 8px;
  }

  .pp-page--mobile .pp-empty {
    padding: 12px 8px;
  }

  .pp-page--mobile .pp-empty.pp-empty--vpn {
    padding: 14px 12px 14px 16px;
  }

  .pp-page--mobile .pp-empty p {
    font-size: 12px;
  }

  .pp-page--mobile .pp-empty__hint {
    font-size: 11px;
  }

  .pp-page--mobile.pp-page--form .pp-head,
  .pp-page--mobile.pp-page--form .pp-top,
  .pp-page--mobile.pp-page--form .pp-gp-editor,
  .pp-page--mobile.pp-page--form .pp-bulk-bar,
  .pp-page--mobile.pp-page--form .pp-list,
  .pp-page--mobile.pp-page--form .pp-vpn,
  .pp-page--mobile.pp-page--form .pp-ipurl,
  .pp-page--mobile.pp-page--form .pp-composer {
    display: none !important;
  }

  .pp-page--mobile.pp-page--gp-form .pp-head,
  .pp-page--mobile.pp-page--gp-form .pp-top,
  .pp-page--mobile.pp-page--gp-form .pp-gp-editor,
  .pp-page--mobile.pp-page--gp-form .pp-bulk-bar,
  .pp-page--mobile.pp-page--gp-form .pp-list,
  .pp-page--mobile.pp-page--gp-form .pp-vpn,
  .pp-page--mobile.pp-page--gp-form .pp-ipurl,
  .pp-page--mobile.pp-page--gp-form .pp-composer {
    display: none !important;
  }

  .pp-page--mobile .pp-mobile-form {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0 0 16px;
  }

  .pp-page--mobile .pp-mobile-form[hidden] {
    display: none !important;
  }

  .pp-page--mobile .pp-mobile-form .pp-editor {
    padding: 0;
  }

  .pp-page--mobile .pp-mobile-form .pp-grid-2--proto {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  .pp-page--mobile .pp-mobile-form .pp-grid-2--proto .pp-field--proto {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .pp-page--mobile .pp-mobile-form .pp-segment {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    gap: 4px;
    overflow: hidden;
  }

  .pp-page--mobile .pp-mobile-form .pp-segment--fit {
    width: 100%;
  }

  .pp-page--mobile .pp-mobile-form .pp-segment__btn {
    flex: 1 1 0;
    min-width: 0;
    height: 30px;
    padding: 0 6px;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pp-page--mobile .pp-mobile-form .pp-field--ipver .pp-segment,
  .pp-page--mobile .pp-mobile-form .pp-field--ipver .pp-segment--icons {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    gap: 0;
    padding: 0;
    overflow: hidden;
  }

  .pp-page--mobile .pp-mobile-form .pp-field--ipver .pp-segment__btn,
  .pp-page--mobile .pp-mobile-form .pp-field--ipver .pp-segment__btn--icon {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 64px;
    padding: 10px 4px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -0.01em;
    white-space: normal;
    text-align: center;
    overflow: hidden;
    text-overflow: unset;
  }

  .pp-page--mobile .pp-mobile-form .pp-field--ipver .pp-segment__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
  }

  .pp-page--mobile .pp-mobile-form .pp-field--ipver .pp-segment__ico .icon {
    width: 20px;
    height: 20px;
  }

  .pp-page--mobile .pp-mobile-form .pp-field--ipver .pp-segment__txt {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pp-page--mobile .pp-mobile-form .pp-help--ipver-lead {
    margin: 2px 0 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.35;
  }

  .pp-page--mobile .pp-mobile-form .pp-field--ipver .pp-help--ipver {
    margin-top: 8px;
  }

  .pp-page--mobile .pp-mobile-form .pp-label {
    font-size: 10px;
  }

  .pp-page--mobile .pp-mobile-form .pp-help,
  .pp-page--mobile .pp-mobile-form .pp-input {
    font-size: 12px;
  }

  .pp-page--mobile .pp-mobile-form .pp-editor__nav {
    margin-bottom: 10px;
  }

  .pp-page--mobile .pp-mobile-form .pp-editor__backlink {
    font-size: 13px;
    font-weight: 500;
    padding: 4px 0;
  }

  .pp-page--mobile .pp-mobile-form .card,
  .pp-page--mobile .pp-mobile-form .pp-card,
  .pp-page--mobile .pp-mobile-form .pp-vpn-card {
    border-radius: 10px;
  }

  .pp-page--mobile .pp-mobile-form .btn--sm {
    min-height: 36px;
    font-size: 12px;
  }

  .pp-page--mobile .pp-mobile-form [data-pp-allowlist] {
    min-height: 96px;
    max-height: 160px;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.45;
  }

  .pp-page--mobile .pp-mobile-form .pp-mobile-gp {
    width: 100%;
    min-width: 0;
  }

  .pp-page--mobile .pp-mobile-form .pp-mobile-gp .pp-editor__nav {
    margin-bottom: 10px;
  }

  .pp-page--mobile .pp-mobile-form .pp-mobile-gp .pp-editor__backlink {
    font-size: 13px;
    font-weight: 500;
    padding: 4px 0;
  }

  .pp-page--mobile .pp-mobile-form .pp-mobile-gp .pp-gpe {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .pp-page--mobile .pp-mobile-form .pp-mobile-gp .pp-gpe__footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-top: 12px;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, transparent 0%, var(--bg) 24%);
  }

  .pp-page--mobile .pp-mobile-form .pp-mobile-gp .pp-gpe__acts {
    width: 100%;
  }

  .pp-page--mobile .pp-mobile-form .pp-mobile-gp .pp-gpe__acts .btn--sm {
    min-height: 36px;
  }
}

/* Automation — mobile card header (toggle inline with title) */
@media (max-width: 767px) {
  .auto-card--mhead {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
  }

  .auto-card--mhead .auto-card__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "lead title switch"
      "lead desc desc";
    column-gap: 8px;
    row-gap: 6px;
    align-items: start;
    padding: 12px;
    border-bottom: 1px solid var(--border-soft);
  }

  .auto-card--mhead .auto-card__lead {
    grid-area: lead;
    display: flex;
    align-items: center;
    gap: 4px;
    flex: none;
    padding-top: 2px;
  }

  .auto-card--mhead .auto-card__glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    flex: none;
  }

  .auto-card--mhead .auto-card__glyph .icon {
    width: 14px;
    height: 14px;
  }

  .auto-card--mhead .auto-card__num {
    width: 14px;
    height: 14px;
    margin-top: 0;
    border-radius: 4px;
    font-size: 8px;
  }

  .auto-card--mhead .auto-card__title {
    grid-area: title;
    margin: 0;
    min-width: 0;
    font-size: 13px;
    line-height: 1.25;
    padding-top: 6px;
  }

  .auto-card--mhead .auto-switch--inline {
    grid-area: switch;
    flex: none;
    flex-direction: row;
    align-items: center;
    align-self: center;
    gap: 0;
  }

  .auto-card--mhead .auto-switch--inline .auto-switch__label {
    display: none;
  }

  .auto-card--mhead .auto-card__desc {
    grid-area: desc;
    margin: 0;
    padding-top: 2px;
    padding-right: 4px;
    font-size: 10px;
    line-height: 1.4;
    max-width: 100%;
  }

  .auto-card--mhead .auto-card__cfg {
    padding: 12px;
    border-top: none;
  }
}
.dev-card .dev-field + .dev-field { margin-top: 14px; }
.dev-card .dev-label { margin-bottom: 7px; }
.dev-card .dev-notes { min-height: 60px !important; height: 60px !important; max-height: none; padding: 10px 12px; }
.dev-card .dev-notes__meta { position: static; text-align: right; margin-top: 6px; padding-right: 2px; font-size: 11px; }
.pp-row__desc-text, .pp-mcard__desc { margin-top: 7px; color: var(--text-secondary); font-size: 12px; font-weight: 400; line-height: 1.5; }

/* Basic info defines the height; shared members never size the desktop row. */
.dev-grid--identity .dev-card .dev-field + .dev-field { margin-top: 8px; }
@media (min-width: 901px) {
  .dev-grid.dev-grid--identity { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dev-grid--identity > .dev-share-mount { position: relative; min-height: 0; height: auto; }
  .dev-grid--identity > .dev-share-mount > .sa-card { position: absolute; inset: 0; height: auto; min-height: 0; overflow: hidden; }
  .dev-grid--identity .sa-card__head, .dev-grid--identity .sa-summary { flex-shrink: 0; }
  .dev-grid--identity .sa-table { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
  .dev-grid--identity .sa-table__head { position: sticky; top: 0; z-index: 1; flex-shrink: 0; }
  .dev-grid--identity .sa-table__row { flex-shrink: 0; }
}
@media (max-width: 900px) {
  .dev-grid.dev-grid--identity { grid-template-columns: minmax(0, 1fr); }
}
/* IP Change: simple rows and one device-level cooldown setting. */
.pp-page .pp-ipurl {max-width:880px;}
.pp-page .pp-ipurl__hint {margin-bottom:14px;line-height:1.6;}
.pp-page .pp-ipurl__list {max-width:880px;gap:0;}
.pp-page .pp-ipurl-row {align-items:center;gap:12px;padding:12px 0;}
.pp-page .pp-ipurl-row + .pp-ipurl-row {border-top:1px solid var(--border-soft);}
.pp-page .pp-ipurl-row__num {margin:0;line-height:1.5;}
.pp-page .pp-ipurl-row__url {font-size:12px;line-height:1.6;overflow-wrap:anywhere;}
.pp-page .pp-ipurl-row__acts {gap:4px;margin:0;}
.pp-page .pp-ipurl-row__acts .pp-ico-btn {width:30px;height:30px;background:transparent;border-color:transparent;}
.pp-page .pp-ipurl-row__acts .pp-ico-btn:hover {background:var(--hover);border-color:var(--border);}
.pp-page .pp-ipurl-row__acts .pp-ico-btn--danger {color:var(--text-muted);}
.pp-page .pp-ipurl-row__acts .pp-ico-btn--danger:hover {color:var(--danger);background:var(--danger-soft);}
.pp-ipurl-cooldown {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 24px;align-items:center;border-top:1px solid var(--border);margin-top:24px;padding-top:20px;}
.pp-ipurl-cooldown__text label {font-size:13px;font-weight:600;color:var(--text);}
.pp-ipurl-cooldown__text p {font-size:12px;color:var(--text-secondary);margin:5px 0;line-height:1.5;}
.pp-ipurl-cooldown__text small {font-size:11px;color:var(--text-muted);}
.pp-ipurl-cooldown__controls {display:flex;align-items:center;gap:10px;}
.pp-ipurl-cooldown__input {display:flex;align-items:center;gap:8px;font-size:12px;color:var(--text-secondary);}
.pp-ipurl-cooldown__input input {width:92px;height:36px;font-variant-numeric:tabular-nums;}
.pp-ipurl-cooldown__feedback {grid-column:1/-1;font-size:11px;color:var(--text-secondary);min-height:16px;}
@media(max-width:767px){.pp-page .pp-ipurl-row{display:grid;grid-template-columns:18px minmax(0,1fr);gap:6px 8px}.pp-page .pp-ipurl-row__acts{grid-column:2;justify-content:flex-end}.pp-ipurl-cooldown{grid-template-columns:minmax(0,1fr);gap:14px}.pp-ipurl-cooldown__controls{justify-content:space-between}.pp-ipurl-cooldown__input input{width:110px}}
/* Cooldown precedes the URL list. */
.pp-ipurl-cooldown {border-top:0;border-bottom:1px solid var(--border);margin-top:0;margin-bottom:20px;padding-top:0;padding-bottom:14px;}
/* Keep IP Change controls close to their content instead of spanning the page. */
.pp-page .pp-ipurl {width:100%;max-width:760px;}
.pp-page .pp-ipurl__list {max-width:760px;}
.pp-ipurl-cooldown {grid-template-columns:minmax(0,1fr);gap:10px;margin-bottom:16px;padding-bottom:16px;}
.pp-ipurl-cooldown__controls {justify-content:flex-start;gap:10px;}
.pp-ipurl-cooldown__input input {width:96px;height:38px;}
.pp-ipurl-cooldown__feedback:empty {display:none;}
.pp-page .pp-ipurl-row {gap:10px;padding:10px 0;}
.pp-page .pp-ipurl-row__url {flex:0 1 auto;}
.pp-page .pp-ipurl-row__acts {margin-left:4px;gap:4px;}
.pp-page .pp-ipurl-row__acts .pp-ico-btn {min-width:34px;width:34px;height:34px;}
.pp-page .pp-ipurl__hint {margin-bottom:8px;}
@media(max-width:767px){.pp-page .pp-ipurl-row__acts{justify-content:flex-start;margin-left:0}.pp-page .pp-ipurl-row__acts .pp-ico-btn{width:40px;height:40px}.pp-ipurl-cooldown__controls{justify-content:flex-start}.pp-ipurl-cooldown__input input{width:100px;height:40px}}
/* One compact action row directly above the URLs. */
.pp-page:has(.pp-ipurl:not([hidden])) .pp-toolbar {display:none;}
.pp-page .pp-ipurl-cooldown {display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;border:0;margin:0 0 10px;padding:0;}
.pp-ipurl-cooldown .pp-ipurl-add {margin-right:auto;flex-shrink:0;}
.pp-ipurl-cooldown__text {flex:0 0 auto;}
/* Request cooldown hidden for now: the class display rules would override [hidden]. */
.pp-ipurl-cooldown [hidden] {display:none;}
.pp-ipurl-cooldown__text label {font-size:12px;font-weight:500;}
.pp-ipurl-cooldown__text p,.pp-ipurl-cooldown__text small {display:none;}
.pp-ipurl-cooldown__controls {gap:8px;}
.pp-ipurl-cooldown__input {gap:6px;font-size:11px;}
.pp-ipurl-cooldown__input input {width:78px;height:34px;padding:6px 8px;}
.pp-ipurl-cooldown__feedback {min-height:0;font-size:11px;}
.pp-page .pp-ipurl__hint {font-size:12px;margin:0 0 6px;}
.pp-page .pp-ipurl-row {padding:8px 0;}
@media(max-width:767px){.pp-page .pp-ipurl-cooldown{gap:8px}.pp-ipurl-cooldown__text label{font-size:11px}.pp-ipurl-cooldown__controls{gap:5px}.pp-ipurl-cooldown__input input{width:72px;height:36px}.pp-ipurl-cooldown__input span{font-size:10px}.pp-ipurl-cooldown .pp-ipurl-add{margin-right:auto}.pp-ipurl-cooldown__feedback{flex-basis:100%}}
/* Fixed action track: URL length never moves the buttons. */
.pp-page .pp-ipurl__list {max-width:640px;}
.pp-page .pp-ipurl-row {display:grid;grid-template-columns:18px minmax(0,1fr) 110px;column-gap:12px;align-items:center;}
.pp-page .pp-ipurl-row__acts {grid-column:3;margin:0;justify-content:flex-end;}
.pp-page .pp-ipurl-row__url {width:100%;min-width:0;}
@media(max-width:767px){
 .pp-page .pp-ipurl-row {grid-template-columns:18px minmax(0,1fr);gap:6px 8px;}
 .pp-page .pp-ipurl-row__acts {grid-column:2;justify-self:end;justify-content:flex-end;}
}
.pp-tlogs-custom-edit {margin-top:8px;max-width:100%;white-space:normal;text-align:left;}
.popover--dtp,.popover--custom-range {box-sizing:border-box;overscroll-behavior:contain;}
/* Mobile-only Proxy & Ports navigation and IP Change layout. */
@media (max-width:767px) {
  .pp-page.pp-page .pp-section-nav {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-auto-rows:44px;
    height:auto;
    max-width:100%;
    overflow:visible;
    gap:4px;
  }
  .pp-page.pp-page .pp-section-nav__btn {
    width:100%;height:44px;min-height:44px;
    position:relative;
  }
  .pp-page.pp-page .pp-section-nav__label {display:inline;white-space:nowrap;overflow:visible;text-overflow:clip;}
  .pp-page.pp-page .pp-ipurl {min-width:0;width:100%;max-width:100%;}
  .pp-page.pp-page .pp-ipurl-cooldown {
    display:grid;grid-template-columns:minmax(0,1fr);
    gap:8px;justify-items:start;align-items:start;margin-bottom:14px;
  }
  .pp-page.pp-page .pp-ipurl-cooldown .pp-ipurl-add {margin:0 0 6px;min-height:40px;}
  .pp-page.pp-page .pp-ipurl-cooldown__text {grid-column:1;}
  .pp-page.pp-page .pp-ipurl-cooldown__text label {font-size:12px;}
  .pp-page.pp-page .pp-ipurl-cooldown__controls {grid-column:1;justify-content:flex-start;}
  .pp-page.pp-page .pp-ipurl-cooldown__input {display:flex;flex-wrap:nowrap;align-items:center;gap:8px;}
  .pp-page.pp-page .pp-ipurl-cooldown__input input {width:90px;height:40px;}
  .pp-page.pp-page .pp-ipurl-cooldown__input span {font-size:12px;white-space:nowrap;}
  .pp-page.pp-page .pp-ipurl__list {width:100%;max-width:100%;min-width:0;}
  .pp-page.pp-page .pp-ipurl-row {display:grid;grid-template-columns:18px minmax(0,1fr);gap:8px;align-items:start;padding:12px 0;}
  .pp-page.pp-page .pp-ipurl-row__num {padding-top:2px;margin:0;}
  .pp-page.pp-page .pp-ipurl-row__url {width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:break-word;line-height:1.5;}
  .pp-page.pp-page .pp-ipurl-row__acts {grid-column:2;justify-self:end;display:flex;gap:6px;margin:0;}
  .pp-page.pp-page .pp-ipurl-row__acts .pp-ico-btn {width:44px;min-width:44px;height:44px;}
}
.pp-page .pp-ipurl-row__acts .pp-ico-btn.is-copy-success {color:var(--ok-text);background:var(--ok-soft);border-color:transparent;}
@media(max-width:767px){
 .ws-header--mobile .ws-toolbar__mobile-head {display:grid;grid-template-columns:32px minmax(0,1fr) 44px;gap:6px;height:56px;}
 .ws-header--mobile .ws-tab-menu {width:32px;height:48px;margin:0;}
 .ws-header--mobile .ws-close {position:static;width:44px;height:48px;}
 .ws-header--mobile .ws-mobile-meta {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 8px;padding:0;overflow:hidden;white-space:normal;}
 .ws-header--mobile .ws-mobile-meta__name {grid-column:1/-1;min-width:0;padding:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
 .ws-header--mobile .ws-mobile-meta__name .ws-idcopy__text {display:block;overflow:hidden;text-overflow:ellipsis;}
 .ws-header--mobile .ws-mobile-meta__id {padding:0;min-width:0;overflow:hidden;white-space:nowrap;}
 .ws-header--mobile .ws-mobile-meta__status {white-space:nowrap;}
 .ws-header--mobile .ws-mobile-meta__sep {display:none;}
}
/* Mobile identity: keep ID and presence together; close retains its own track. */
@media(max-width:767px){
 .ws-header--mobile .ws-mobile-meta {grid-template-columns:max-content minmax(0,1fr);column-gap:8px;align-items:center;}
 .ws-header--mobile .ws-mobile-meta__name {grid-column:1/-1;}
 .ws-header--mobile .ws-mobile-meta__id {grid-column:1;grid-row:2;}
 .ws-header--mobile .ws-mobile-meta__status {grid-column:2;grid-row:2;justify-self:start;padding-left:8px;border-left:1px solid var(--border);line-height:1.2;}
 .pp-page.pp-page .pp-section-nav {gap:8px;border:0;padding:0;grid-auto-rows:44px;}
 .pp-page.pp-page .pp-section-nav__btn {border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);height:44px;padding:0 10px !important;}
 .pp-page.pp-page .pp-section-nav__btn:not(.is-active) {border-color:var(--border);background:var(--surface);color:var(--text-secondary);}
 .pp-page.pp-page .pp-section-nav__btn.is-active {border-color:var(--blue-border-soft);background:var(--blue-soft);color:var(--blue);}
 .pp-page.pp-page .pp-section-nav__btn.is-active::after {display:none;}
 .pp-page.pp-page .pp-section-nav__btn:focus-visible {outline:2px solid var(--blue);outline-offset:2px;}
}
/* Slightly denser mobile access-type tabs. */
@media(max-width:767px){
 .pp-page.pp-page .pp-section-nav {grid-auto-rows:38px;gap:6px;}
 .pp-page.pp-page .pp-section-nav__btn {height:38px;min-height:38px;font-size:11px;gap:6px;}
 .pp-page.pp-page .pp-section-nav__ico,
 .pp-page.pp-page .pp-section-nav__ico .icon {width:14px;height:14px;}
}
/* Subtle, shared copy feedback; one notice is reused across repeated copies. */
.copy-confirmation {pointer-events:none;font-size:11px;padding:5px 9px;}
@media(max-width:767px){
 .pp-page.pp-page .pp-head__meta {margin-top:5px;margin-bottom:12px;line-height:1.5;}
 .pp-page.pp-page .pp-section-nav {margin-bottom:10px;}
 .pp-page.pp-page .pp-ipurl-cooldown__input input {width:76px;height:34px;padding:5px 8px;font-size:12px;}
 .pp-page.pp-page .pp-ipurl-row {padding:9px 0;gap:5px 8px;}
 .pp-page.pp-page .pp-ipurl-row__url {font-size:11px;line-height:1.5;}
 .pp-page.pp-page .pp-ipurl-row__acts {gap:4px;}
 .pp-page.pp-page .pp-ipurl-row__acts .pp-ico-btn {width:36px;min-width:36px;height:36px;padding:9px;}
 .pp-page.pp-page .pp-ipurl-row__acts .pp-ico-btn .icon {width:15px;height:15px;}
}

/* Ports: compact empty state and shared paused label. */
.pp-empty.pp-empty--ports { padding: 20px 24px; }
.pp-empty--ports p:last-child { margin-bottom: 0; }
.pp-port-paused {
  font-family: var(--font);
  font-size: var(--fs-12);
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-secondary);
}
@media (max-width: 760px) {
  .pp-page--mobile .pp-empty.pp-empty--ports { padding: 18px 16px; }
}

/* Desktop workspace introductions: consistent inset and vertical rhythm. */
@media (min-width: 1024px) {
  [data-layout="desktop"] .app.is-workspace #view-outlet:has(> .ws-header) > #ws-content:has(> :is(.auto-page, .dev-page, .conn-page, .plan-page, .act-page, .diag-page, .pp-page)),
  [data-layout="desktop"] .app.is-workspace .main:has(> .ws-header) > #ws-content:has(> :is(.auto-page, .dev-page, .conn-page, .plan-page, .act-page, .diag-page, .pp-page)) {
    padding: 24px 32px 0;
  }
  [data-layout="desktop"] #ws-content > :is(.auto-page, .dev-page, .conn-page) > header { margin-bottom: 8px; }
  [data-layout="desktop"] #ws-content > .plan-page > header { margin-bottom: 6px; }
  [data-layout="desktop"] #ws-content > :is(.act-page, .diag-page) > header { margin-bottom: 4px; }
  [data-layout="desktop"] #ws-content > :is(.auto-page, .dev-page, .conn-page, .plan-page, .act-page, .diag-page, .pp-page) > header :is(.auto-head__desc, .dev-head__sub, .plan-head__sub, .ws-page__meta) {
    margin-top: 6px; line-height: 1.5;
  }
  [data-layout="desktop"] #ws-content > .diag-page .diag-head__status { margin-top: 8px; line-height: 1.4; }
}

@media (min-width: 1024px) {
  [data-layout="desktop"] #ws-content > .pp-page > .pp-head { margin-bottom: 20px; }
  [data-layout="desktop"] #ws-content > .pp-page .pp-head__titles { padding: 0; gap: 6px; }
  [data-layout="desktop"] #ws-content > .pp-page .pp-head__meta { margin: 0; line-height: 1.5; }
}

/* Match Automation typography across desktop workspace introductions. */
@media (min-width: 1024px) {
  [data-layout="desktop"] #ws-content > :is(.auto-page, .dev-page, .conn-page, .plan-page, .act-page, .diag-page, .pp-page) > header :is(.auto-head__title, .dev-head__title, .plan-head__title, .ws-page__title, .pp-title) {
    font-family: var(--font); font-size: 16px; font-weight: 600;
    letter-spacing: -0.02em; line-height: 1.2; color: var(--text);
  }
  [data-layout="desktop"] #ws-content > :is(.auto-page, .dev-page, .conn-page, .plan-page, .act-page, .diag-page, .pp-page) > header :is(.auto-head__desc, .dev-head__sub, .plan-head__sub, .ws-page__meta, .pp-head__meta) {
    font-family: var(--font); font-size: 11px; font-weight: 400;
    letter-spacing: normal; line-height: 1.5; color: var(--text-muted);
  }
  [data-layout="desktop"] #ws-content > .diag-page .diag-head__status {
    font-family: var(--font); font-size: 10px; font-weight: 500;
    letter-spacing: normal; color: var(--text-secondary);
  }
}

/* A little breathing room below desktop workspace action buttons. */
@media (min-width: 1024px) {
  [data-layout="desktop"] .ws-header .ws-toolbar--desktop {
    height: 48px;
    padding-bottom: 8px;
  }
}

/* Controls the API would refuse on this connection. data-deny comes from
   OP.workspace.deniedOn; the API still decides every request. */
[data-deny~="manage_connections"] [data-dev-save],
[data-deny~="manage_connections"] [data-dev-fp-card],
[data-deny~="manage_connections"] .dev-action:has([data-dev-move-server]),
[data-deny~="manage_connections"] .dev-action:has([data-dev-reset]),
[data-deny~="manage_connections"] [data-pp-gp-configure],
[data-deny~="remove_connections"] .dev-action:has([data-dev-delete]),
[data-deny~="manage_api_keys"] [data-dev-api-card],
[data-deny~="manage_api_keys"][data-deny~="manage_connections"] .dev-grid:has(> [data-dev-api-card]),
[data-deny~="operate_connections"] [data-act="start"],
[data-deny~="operate_connections"] [data-act="stop"],
[data-deny~="operate_connections"] [data-act="reconnect"],
[data-deny~="operate_connections"] [data-act="restart"],
[data-deny~="operate_connections"] [data-act="locate"],
[data-deny~="operate_connections"] [data-diag-run],
[data-deny~="change_ip"] [data-act="rotate"],
[data-deny~="manage_ports"] [data-pp-create],
[data-deny~="manage_ports"] [data-pp-settings],
[data-deny~="manage_ports"] [data-pp-delete],
[data-deny~="manage_ports"] [data-pp-toggle-active],
[data-deny~="manage_ports"] [data-pp-bulk],
[data-deny~="manage_ports"] [data-pp-section="ipurl"],
[data-deny~="manage_ports"] [data-ov-create],
[data-deny~="manage_ports"] [data-create-port],
[data-deny~="manage_ports"] [data-add-vpn],
[data-deny~="manage_ports"] [data-add-rotation-url],
[data-deny~="manage_ports"] [data-delete-rotation],
[data-deny~="manage_ports"] [data-port-settings],
[data-deny~="manage_ports"] [data-port-toggle-active],
[data-deny~="manage_ports"] [data-port-delete],
[data-deny~="manage_ports"] [data-vpn-edit],
[data-deny~="manage_ports"] [data-vpn-delete],
[data-deny~="manage_firewall"] .pp-acc:has([data-pp-toggle-dest]),
[data-deny~="manage_firewall"] .pp-field:has(> [data-pp-allowlist]),
[data-deny~="manage_firewall"] .cp-block--allowlist,
[data-deny~="manage_firewall"] .drawer-gp__dest:has([data-pp-gp-dest-toggle]),
[data-deny~="manage_firewall"] .drawer-gp__dest:has([data-pp-gp-allow-toggle]),
[data-deny~="manage_automation"] [data-auto-reset],
[data-deny~="view_credentials"] [data-pp-vpn-dl],
[data-deny~="view_credentials"] [data-vpn-download],
[data-deny~="view_credentials"] [data-pp-open-tlogs],
[data-deny~="view_credentials"] [data-pp-view-tlogs] {
  display: none !important;
}

/* Kept in place so the row columns stay aligned. */
[data-deny~="manage_ports"] [data-pp-select] { visibility: hidden; }

/* The rules stay readable. */
[data-deny~="manage_automation"] [data-auto-card] input,
[data-deny~="manage_automation"] [data-auto-card] select,
[data-deny~="manage_automation"] [data-auto-card] textarea,
[data-deny~="manage_automation"] [data-auto-card] button {
  pointer-events: none;
}
