/* User request (no tracker ID) | 2026-11-13 | George | Establish shared readable design tokens for the VPS and DevOps workspaces. */
:root {
  color-scheme: light;
  --vps-canvas: #f4f7fa;
  --vps-surface: #ffffff;
  --vps-surface-raised: #ffffff;
  --vps-surface-subtle: #edf3f5;
  --vps-text: #172b35;
  --vps-body: #344b55;
  --vps-muted: #526b74;
  --vps-line: #d6e1e4;
  --vps-line-strong: #b8c9ce;
  --vps-teal: #087f78;
  --vps-teal-strong: #066b66;
  --vps-teal-soft: #e5f4f2;
  --vps-blue: #245f83;
  --vps-blue-soft: #eaf2f7;
  --vps-green: #16734c;
  --vps-green-soft: #e9f5ee;
  --vps-amber: #805600;
  --vps-amber-soft: #fff5dc;
  --vps-red: #a12f39;
  --vps-red-soft: #fff0f0;
  --vps-shadow: 0 8px 24px rgba(24, 49, 58, .07);
  --vps-radius: 10px;
  --vps-rail-width: 248px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

/* User request (no tracker ID) | 2026-11-13 | George | Map existing host and Org component variables to the shared light workspace palette. */
.vps-shell {
  --bg: var(--vps-canvas);
  --sidebar: var(--vps-surface);
  --panel: var(--vps-surface);
  --panel-raised: var(--vps-surface-raised);
  --line: var(--vps-line);
  --text: var(--vps-text);
  --body: var(--vps-body);
  --muted: var(--vps-muted);
  --teal: var(--vps-teal);
  --green: var(--vps-green);
  --blue: var(--vps-blue);
  --amber: var(--vps-amber);
  --red: var(--vps-red);
  min-height: 100vh;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: var(--vps-rail-width) minmax(0, 1fr);
  background: var(--vps-canvas);
  color: var(--vps-text);
  font: 400 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* User request (no tracker ID) | 2026-11-13 | George | Apply the same shell and token contract to the incorporated DevOps workspace only. */
html[data-vps-platform="true"] .shell {
  --workspace-canvas: var(--vps-canvas);
  --workspace-surface: var(--vps-surface);
  --workspace-surface-subtle: var(--vps-surface-subtle);
  --workspace-text: var(--vps-text);
  --workspace-muted: var(--vps-muted);
  --workspace-line: var(--vps-line);
  --workspace-line-strong: var(--vps-line-strong);
  --workspace-blue: var(--vps-teal);
  --workspace-blue-soft: var(--vps-teal-soft);
  --workspace-danger: var(--vps-red);
  --workspace-danger-soft: var(--vps-red-soft);
  --workspace-shadow: var(--vps-shadow);
  grid-template-columns: var(--vps-rail-width) minmax(0, 1fr);
  background: var(--vps-canvas);
  color: var(--vps-text);
  font: 400 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: none;
}

/* User request (no tracker ID) | 2026-11-13 | George | Prevent legacy standalone page shells from constraining the shared application frame. */
.vps-shell,
.vps-shell *,
.vps-shell *::before,
.vps-shell *::after { box-sizing: border-box; }

/* User request (no tracker ID) | 2026-11-13 | George | Keep background scroll fixed while the shared mobile navigation drawer is open. */
body.vps-nav-open { overflow: hidden; }

/* User request (no tracker ID) | 2026-11-13 | George | Normalize the document-level reading size and canvas behind every shared shell. */
body:has(.vps-shell),
body.vps-auth,
html[data-vps-platform="true"] body {
  min-height: 100vh;
  background: var(--vps-canvas);
  color: var(--vps-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

/* User request (no tracker ID) | 2026-11-13 | George | Give both workspaces a consistent rail, brand, account area, and touch-friendly navigation. */
.vps-shell .vps-rail,
html[data-vps-platform="true"] .shell .vps-rail,
html[data-vps-platform="true"] .shell .rail {
  position: sticky;
  top: 0;
  z-index: 30;
  width: auto;
  min-width: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 14px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--vps-surface);
  border: 0;
  border-right: 1px solid var(--vps-line);
  box-shadow: none;
  transition: transform .18s ease;
}

.vps-brand,
.vps-shell .brand,
html[data-vps-platform="true"] .shell .rail-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 6px 16px;
  color: var(--vps-text);
  text-decoration: none;
  border: 0;
  border-bottom: 1px solid var(--vps-line);
}

.vps-brand-mark,
.vps-shell .brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: var(--vps-teal);
  color: #fff;
  box-shadow: none;
  font-size: 18px;
  font-weight: 800;
}

.vps-brand-copy,
.vps-shell .brand-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  line-height: 1.25;
}

.vps-brand-copy strong,
.vps-shell .brand-copy strong { font-size: 17px; letter-spacing: .01em; }
.vps-brand-copy small,
.vps-shell .brand-copy small { color: var(--vps-muted); font-size: 12px; letter-spacing: .08em; }

/* User request (no tracker ID) | 2026-11-13 | George | Standardize group labels, active links, focus states, and account context across routes. */
.vps-shell .vps-nav-group,
html[data-vps-platform="true"] .shell .vps-nav-group,
html[data-vps-platform="true"] .shell .rail-section,
html[data-vps-platform="true"] .shell .rail-platform-links {
  min-width: 0;
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.vps-shell .vps-nav-heading,
html[data-vps-platform="true"] .shell .vps-nav-heading,
.vps-shell .nav-label,
html[data-vps-platform="true"] .shell .rail-title,
html[data-vps-platform="true"] .shell .rail-platform-links > strong {
  margin: 0;
  padding: 5px 9px;
  color: var(--vps-muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.4;
  text-transform: none;
}

.vps-shell .vps-nav-link,
html[data-vps-platform="true"] .shell .vps-nav-link,
.vps-shell .nav-item,
html[data-vps-platform="true"] .shell .nav-link,
html[data-vps-platform="true"] .shell .rail-platform-links a {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  color: var(--vps-body);
  font-size: 15px;
  font-weight: 550;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.vps-shell .vps-nav-link:hover,
html[data-vps-platform="true"] .shell .vps-nav-link:hover,
.vps-shell .nav-item:hover,
html[data-vps-platform="true"] .shell .nav-link:hover,
html[data-vps-platform="true"] .shell .rail-platform-links a:hover {
  background: var(--vps-surface-subtle);
  color: var(--vps-text);
}

.vps-shell .vps-nav-link[aria-current="page"],
html[data-vps-platform="true"] .shell .vps-nav-link[aria-current="page"],
.vps-shell .nav-item[aria-current="page"],
html[data-vps-platform="true"] .shell .nav-link[aria-current="page"],
html[data-vps-platform="true"] .shell .rail-platform-links a[aria-current="page"] {
  background: var(--vps-teal-soft);
  color: #075d59;
  font-weight: 700;
}

.vps-shell .vps-account,
html[data-vps-platform="true"] .shell .vps-account,
.vps-shell .sidebar-bottom,
html[data-vps-platform="true"] .shell .rail-user {
  min-width: 0;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--vps-line);
  color: var(--vps-text);
}

/* User request (no tracker ID) | 2026-11-13 | George | Use one readable top bar and content width for host and DevOps routes. */
.vps-shell .vps-main,
html[data-vps-platform="true"] .shell .main {
  min-width: 0;
  min-height: 100vh;
  background: var(--vps-canvas);
}

.vps-shell .vps-topbar,
html[data-vps-platform="true"] .shell .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-width: 0;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(18px, 3vw, 42px);
  border: 0;
  border-bottom: 1px solid var(--vps-line);
  background: rgba(255, 255, 255, .96);
  color: var(--vps-body);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.vps-shell .vps-breadcrumbs,
.vps-shell .breadcrumbs,
html[data-vps-platform="true"] .shell .topbar-breadcrumbs {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--vps-muted);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.vps-shell .vps-breadcrumbs strong,
.vps-shell .breadcrumbs strong,
html[data-vps-platform="true"] .shell .topbar-breadcrumbs strong { color: var(--vps-text); font-weight: 700; }

.vps-shell .vps-content,
.vps-shell .page-wrap,
html[data-vps-platform="true"] .shell .content {
  width: min(100%, 1600px);
  min-width: 0;
  margin: 0 auto;
  padding: clamp(22px, 3vw, 40px) clamp(18px, 3vw, 42px) 36px;
  color: var(--vps-text);
}

/* User request (no tracker ID) | 2026-11-13 | George | Keep the shared page frame from doubling padding around legacy host and feedback page wrappers. */
.vps-shell .vps-content > .page-wrap,
.vps-shell .vps-content > .access-shell,
.vps-shell .vps-content > .content {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* User request (no tracker ID) | 2026-11-13 | George | Make the shared skip link discoverable on keyboard focus and align rail actions. */
.vps-skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 10px 14px;
  border: 2px solid var(--vps-teal-strong);
  border-radius: 7px;
  background: var(--vps-surface);
  color: var(--vps-text);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}
.vps-skip:focus { transform: translateY(0); outline: 3px solid var(--vps-teal); outline-offset: 2px; }

.vps-rail-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.vps-rail-heading .vps-brand { flex: 1 1 auto; }

/* User request (no tracker ID) | 2026-11-13 | George | Present account identity and role as readable stacked context with a clear sign-out action. */
.vps-shell .vps-account {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.vps-shell .vps-account > div { min-width: 0; display: grid; gap: 3px; }
.vps-shell .vps-account strong { color: var(--vps-text); font-size: 15px; font-weight: 700; }
.vps-shell .vps-account small { display: block; color: var(--vps-muted); font-size: 14px; line-height: 1.4; }
.vps-shell .vps-sign-out { min-height: 40px; justify-self: start; padding: 7px 10px; border: 1px solid var(--vps-line-strong); border-radius: 7px; background: var(--vps-surface); color: var(--vps-text); font: inherit; font-size: 14px; cursor: pointer; }
.vps-shell .vps-sign-out:hover { background: var(--vps-surface-subtle); }
.vps-shell .vps-signout-message { margin: 0; color: var(--vps-red); font-size: 14px; }

/* User request (no tracker ID) | 2026-11-13 | George | Keep route tools aligned and usable at desktop and phone widths. */
.vps-shell .vps-toolbar { min-width: 0; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; color: var(--vps-body); }
.vps-shell .vps-toolbar > * { min-width: 0; }

/* User request (no tracker ID) | 2026-11-13 | George | Make page headings, explanatory copy, cards, tables, forms, and empty states consistently legible. */
.vps-shell :is(.page-heading, .page-head, .heading) h1,
html[data-vps-platform="true"] .shell :is(.page-heading, .page-head, .heading) h1 {
  color: var(--vps-text);
  font-size: clamp(28px, 2.2vw, 36px);
  font-weight: 720;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.vps-shell :is(.subheading, .intro, .page-heading p, .page-head p, .heading p),
html[data-vps-platform="true"] .shell :is(.subheading, .intro, .page-heading p, .page-head p, .heading p) {
  color: var(--vps-body);
  font-size: 16px;
  line-height: 1.55;
}

/* User request (no tracker ID) | 2026-11-13 | George | Keep section labels and standalone feedback headings legible on the shared light canvas. */
.vps-shell :is(.eyebrow, .page-kicker) { color: var(--vps-muted); font-size: 14px; font-weight: 700; letter-spacing: .035em; }
html[data-vps-platform="true"] .shell :is(.eyebrow, .page-kicker) { color: var(--vps-muted); font-size: 14px; font-weight: 700; letter-spacing: .035em; }
.vps-shell .intro h1 { color: var(--vps-text); font-size: clamp(28px, 2.2vw, 36px); }

.vps-shell :is(.panel, .summary-card, .host-card, .chart-card, .empty-card, .connection-card, .web-card, .resource-card, .onboarding-card, .table-scroll),
html[data-vps-platform="true"] .shell :is(.panel, .summary-card, .host-card, .chart-card, .empty-card, .connection-card, .web-card, .resource-card, .onboarding-card, .table-scroll) {
  min-width: 0;
  border-color: var(--vps-line);
  border-radius: var(--vps-radius);
  background: var(--vps-surface);
  color: var(--vps-text);
  box-shadow: var(--vps-shadow);
}

.vps-shell :is(.section-note, .card-label, .summary-foot, .result-count, .verification-note, .files-footnote),
html[data-vps-platform="true"] .shell :is(.section-note, .card-label, .summary-foot, .result-count, .verification-note, .files-footnote) {
  color: var(--vps-muted);
  font-size: 14px;
  line-height: 1.45;
}

.vps-shell table,
html[data-vps-platform="true"] .shell table { width: 100%; border-collapse: collapse; color: var(--vps-text); font-size: 15px; }
.vps-shell :is(th, td),
html[data-vps-platform="true"] .shell :is(th, td) { padding: 10px 12px; border-bottom: 1px solid var(--vps-line); text-align: left; vertical-align: top; }
.vps-shell th,
html[data-vps-platform="true"] .shell th { background: var(--vps-surface-subtle); color: var(--vps-muted); font-size: 14px; font-weight: 700; }
.vps-shell :is(input, select, textarea),
html[data-vps-platform="true"] .shell :is(input, select, textarea) { min-height: 42px; max-width: 100%; border: 1px solid var(--vps-line-strong); border-radius: 7px; background: var(--vps-surface); color: var(--vps-text); font: inherit; font-size: 16px; }
.vps-shell :is(button, .button, .btn, .primary-button, .secondary-button, .refresh-button),
html[data-vps-platform="true"] .shell :is(button, .button, .btn, .primary-button, .secondary-button, .refresh-button) { min-height: 42px; font-family: inherit; font-size: 16px; }
.vps-shell :is(.status-banner, .global-notice, .info-callout, .verification-note),
html[data-vps-platform="true"] .shell :is(.status-banner, .global-notice, .info-callout, .verification-note) { color: var(--vps-body); }
.vps-shell :is(.dialog, .app-dialog, .drawer, [role="dialog"]),
html[data-vps-platform="true"] .shell :is(.dialog, .app-dialog, .drawer, [role="dialog"]) { color: var(--vps-text); }

/* User request (no tracker ID) | 2026-11-13 | George | Adapt every host dashboard component whose original dark palette conflicts with the shared light canvas. */
.vps-shell[data-page="host"] :is(.summary-card, .resource-card, .host-card, .chart-card, .connection-card, .web-card, .onboarding-card) { background: var(--vps-surface); }
.vps-shell[data-page="host"] :is(.summary-value, .host-name, .metric-value, .web-label, .connection-card-title h3, .chart-card h3, .guest-button, .file-name-button, .resource-value) { color: var(--vps-text); }
.vps-shell[data-page="host"] :is(.card-label, .summary-foot, .host-meta, .metric-label, .host-load, .section-note, .resource-label, .resource-helper, .chart-card p, .chart-legend, .web-url, .web-result, .connection-details, .onboarding-card > p, .onboarding-card label, .files-footnote, .file-selection, .refresh-stamp) { color: var(--vps-body); }
.vps-shell[data-page="host"] :is(.empty-card, .table-empty) { color: var(--vps-muted); }
.vps-shell[data-page="host"] .status-banner { border-color: var(--vps-line); background: var(--vps-surface-subtle); color: var(--vps-body); }
.vps-shell[data-page="host"] .status-banner.live { border-color: #9fcbb5; background: var(--vps-green-soft); color: #175b3e; }
.vps-shell[data-page="host"] :is(.status-banner.degraded, .status-banner.stale) { border-color: #e4ca82; background: var(--vps-amber-soft); color: #674600; }
.vps-shell[data-page="host"] .status-banner.error { border-color: #e2aeb1; background: var(--vps-red-soft); color: #8c2630; }
.vps-shell[data-page="host"] :is(.state-pill.online, .state-pill.running, .connection-badge.enabled, .connection-badge.primary, .web-result.good) { border-color: #9fcbb5; background: var(--vps-green-soft); color: #175b3e; }
.vps-shell[data-page="host"] :is(.state-pill.unavailable, .state-pill.error, .web-result.bad) { border-color: #e2aeb1; background: var(--vps-red-soft); color: #8c2630; }
.vps-shell[data-page="host"] :is(.state-pill.paused, .state-pill.unknown) { border-color: #e4ca82; background: var(--vps-amber-soft); color: #674600; }
.vps-shell[data-page="host"] :is(.state-pill.powered-off, .connection-badge) { border: 1px solid var(--vps-line); background: var(--vps-surface-subtle); color: var(--vps-body); }
.vps-shell[data-page="host"] .status-banner .banner-time { color: var(--vps-muted); }
.vps-shell[data-page="host"] :is(.host-metrics, .connection-details) { border-color: var(--vps-line); }
.vps-shell[data-page="host"] :is(.host-glyph, .summary-icon, .web-mark, .connection-badge) { box-shadow: none; }
.vps-shell[data-page="host"] .host-glyph { background: var(--vps-teal-soft); color: var(--vps-teal-strong); }
.vps-shell[data-page="host"] .summary-icon.teal { background: var(--vps-teal-soft); color: var(--vps-teal-strong); }
.vps-shell[data-page="host"] .summary-icon.blue { background: var(--vps-blue-soft); color: var(--vps-blue); }
.vps-shell[data-page="host"] .summary-icon.violet { background: #f1eefb; color: #5f4a94; }
.vps-shell[data-page="host"] .summary-icon.amber { background: var(--vps-amber-soft); color: #674600; }
.vps-shell[data-page="host"] .web-mark { background: var(--vps-green-soft); color: #175b3e; }
.vps-shell[data-page="host"] .web-mark.bad { background: var(--vps-red-soft); color: #8c2630; }
.vps-shell[data-page="host"] .web-mark.unknown { background: var(--vps-amber-soft); color: #674600; }
.vps-shell[data-page="host"] .info-callout { border-color: var(--vps-line); background: var(--vps-blue-soft); color: var(--vps-body); }
.vps-shell[data-page="host"] .info-callout strong { color: var(--vps-text); }
.vps-shell[data-page="host"] a { color: var(--vps-teal-strong); }
.vps-shell[data-page="host"] .mode-pill { border-color: var(--vps-line); background: var(--vps-surface-subtle); color: var(--vps-body); }
.vps-shell[data-page="host"] .mode-pill .dot { box-shadow: none; }
.vps-shell[data-page="host"] .table-scroll { width: 100%; max-width: 100%; min-width: 0; overflow: auto; background: var(--vps-surface); }
.vps-shell .table-scroll,
html[data-vps-platform="true"] .shell .table-scroll { position: relative; }
.vps-shell[data-page="host"] :is(thead, th) { background: var(--vps-surface-subtle); }
.vps-shell[data-page="host"] td { border-color: var(--vps-line); color: var(--vps-body); }
.vps-shell[data-page="host"] tbody tr:hover { background: #f0f6f7; }
.vps-shell[data-page="host"] :is(.search-box, .select-wrap select, .path-form input, .dialog-input) { border-color: var(--vps-line-strong); background: var(--vps-surface); color: var(--vps-text); }
.vps-shell[data-page="host"] .search-box { color: var(--vps-muted); }
.vps-shell[data-page="host"] .search-box input { color: var(--vps-text); }
.vps-shell[data-page="host"] :is(.search-box input::placeholder, .path-form input::placeholder, .dialog-input::placeholder) { color: var(--vps-muted); opacity: 1; }
.vps-shell[data-page="host"] .breadcrumbs-bar { border-color: var(--vps-line); background: var(--vps-surface-subtle); }
.vps-shell[data-page="host"] :is(.breadcrumb-button, .section-link) { color: var(--vps-teal-strong); }
.vps-shell[data-page="host"] .breadcrumb-current { color: var(--vps-text); }
.vps-shell[data-page="host"] .env-tag { border-color: var(--vps-line); background: var(--vps-surface-subtle); color: var(--vps-body); }
.vps-shell[data-page="host"] .env-tag.production { border-color: #e2aeb1; background: var(--vps-red-soft); color: #8c2630; }
.vps-shell[data-page="host"] .env-tag.nonproduction { border-color: #9fcbb5; background: var(--vps-green-soft); color: #175b3e; }
.vps-shell[data-page="host"] .env-tag.utility { border-color: #c6b8df; background: #f1eefb; color: #5f4a94; }
.vps-shell[data-page="host"] .onboarding-card pre { border-color: var(--vps-line); background: #f6f9fa; color: var(--vps-text); }
.vps-shell[data-page="host"] .page-footer { border-color: var(--vps-line); color: var(--vps-muted); font-size: 14px; }
.vps-shell[data-page="host"] #org-access-notice { margin: 0 0 24px; padding: 20px; border: 1px solid var(--vps-line); background: var(--vps-surface); }
.vps-shell[data-page="host"] #org-access-notice h2 { margin: 0 0 8px; }
.vps-shell[data-page="host"] .guest-action-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vps-shell[data-page="host"] .host-error { color: var(--vps-red); }
.vps-shell[data-page="host"] .file-row.selected { background: var(--vps-teal-soft); }
.vps-shell[data-page="host"] .danger-outline { border-color: #d79b9f; background: var(--vps-red-soft); color: #8c2630; }
.vps-shell[data-page="host"] .danger-outline:hover:not(:disabled) { border-color: var(--vps-red); background: #fbe2e3; color: #7d2029; }

/* User request (no tracker ID) | 2026-11-13 | George | Give host and Org actions a consistent accessible teal primary and light secondary treatment. */
.vps-shell :is(.primary-button, .button.primary, .btn.primary, .refresh-button),
html[data-vps-platform="true"] .shell :is(.primary-button, .button.primary, .btn.primary, .refresh-button) {
  border-color: var(--vps-teal-strong);
  background: var(--vps-teal);
  color: #fff;
  font-weight: 700;
}
.vps-shell :is(.primary-button, .button.primary, .btn.primary, .refresh-button):hover:not(:disabled),
html[data-vps-platform="true"] .shell :is(.primary-button, .button.primary, .btn.primary, .refresh-button):hover:not(:disabled) { border-color: #045c58; background: #066f69; color: #fff; }
.vps-shell :is(.secondary-button, .button.secondary, .btn.secondary),
html[data-vps-platform="true"] .shell :is(.secondary-button, .button.secondary, .btn.secondary) { border: 1px solid var(--vps-line-strong); background: var(--vps-surface); color: var(--vps-text); }
.vps-shell :is(.secondary-button, .button.secondary, .btn.secondary):hover:not(:disabled),
html[data-vps-platform="true"] .shell :is(.secondary-button, .button.secondary, .btn.secondary):hover:not(:disabled) { border-color: var(--vps-teal); background: var(--vps-teal-soft); color: var(--vps-text); }
.vps-shell .danger-button,
html[data-vps-platform="true"] .shell .danger-button { border-color: #8c2630; background: var(--vps-red); color: #fff; }

/* User request (no tracker ID) | 2026-11-13 | George | Keep checkbox hit targets and text sizing practical in account and feedback forms. */
.vps-shell input[type="checkbox"] { width: 18px; min-width: 18px; min-height: 18px; height: 18px; accent-color: var(--vps-teal); }
.vps-shell :is(.helper, .user-row-copy small, .panel-heading p, .field-grid label, .field, .toggle, .role-option, .project-role-row strong, .status, .kind, .meta) { font-size: 14px; }
.vps-shell .user-row-copy small { display: block; margin-top: 4px; color: var(--vps-muted); line-height: 1.4; }
.vps-shell :is(.heading, .intro) { max-width: none; margin-left: 0; margin-right: 0; text-align: left; }
.vps-shell .intro h1 { text-align: left; }

/* User request (no tracker ID) | 2026-11-13 | George | Restyle access and testing components whose legacy declarations use fixed dark colors. */
.vps-shell :is(.panel, .feedback-card, .user-row, .project-role-row, .server-context) {
  border-color: var(--vps-line);
  background: var(--vps-surface);
  color: var(--vps-text);
  box-shadow: var(--vps-shadow);
}
.vps-shell :is(.panel-heading p, .helper, .meta, .empty, .empty-card, .vps-page-account, .field-grid label, .field, .toggle, legend, .role-option) { color: var(--vps-body); }
.vps-shell :is(input:not([type="checkbox"]), select, textarea) { background: var(--vps-surface); color: var(--vps-text); border-color: var(--vps-line-strong); }
.vps-shell fieldset { border-color: var(--vps-line); }
.vps-shell .button { border-color: var(--vps-line-strong); background: var(--vps-surface-subtle); color: var(--vps-text); }
.vps-shell .button.primary { border-color: var(--vps-teal-strong); background: var(--vps-teal); color: #fff; }
.vps-shell :is(.message, .global-notice) { border-color: #9fcbb5; background: var(--vps-green-soft); color: #175b3e; }
.vps-shell :is(.message.error, .global-notice.error) { border-color: #e2aeb1; background: var(--vps-red-soft); color: #8c2630; }
.vps-shell :is(.status, .kind) { background: var(--vps-teal-soft); color: #075d59; font-size: 14px; }
.vps-shell .status.disabled { background: var(--vps-red-soft); color: #8c2630; }
.vps-shell .feedback-top > .status { flex: 0 0 auto; white-space: normal; }
.vps-shell .project-links a,
.vps-shell .section-link { color: var(--vps-teal-strong); }
.vps-shell .triage { border-color: var(--vps-line); }

/* User request (no tracker ID) | 2026-11-13 | George | Match the host details drawer and file dialogs to the shared light workspace, including overlays rendered beside the shell. */
body:has(.vps-shell) .drawer-backdrop { z-index: 70; background: rgba(18, 40, 48, .38); }
body:has(.vps-shell) .details-drawer { z-index: 71; border-color: var(--vps-line); background: var(--vps-surface); color: var(--vps-text); box-shadow: 0 18px 45px rgba(18, 40, 48, .2); }
body:has(.vps-shell) .details-drawer[aria-hidden="true"] { display: none; }
body:has(.vps-shell) .drawer-header { border-color: var(--vps-line); }
body:has(.vps-shell) .drawer-header h2 { color: var(--vps-text); }
body:has(.vps-shell) .detail-group { border-color: var(--vps-line); }
body:has(.vps-shell) .detail-group h3 { color: var(--vps-muted); }
body:has(.vps-shell) .detail-row dt { color: var(--vps-muted); }
body:has(.vps-shell) .detail-row dd { color: var(--vps-text); }
body:has(.vps-shell) .app-dialog { border-color: var(--vps-line); border-radius: 12px; background: var(--vps-surface); color: var(--vps-text); box-shadow: 0 25px 90px rgba(18, 40, 48, .24); }
body:has(.vps-shell) .app-dialog::backdrop { background: rgba(18, 40, 48, .42); backdrop-filter: blur(3px); }
body:has(.vps-shell) .dialog-shell { color: var(--vps-text); }
body:has(.vps-shell) .dialog-shell > label:not(.sr-only) { color: var(--vps-body); font-size: 15px; }
body:has(.vps-shell) .dialog-shell textarea { border-color: var(--vps-line-strong); background: #f8fafb; color: var(--vps-text); font-size: 15px; }
body:has(.vps-shell) .dialog-hint,
body:has(.vps-shell) .dialog-heading h2 { color: var(--vps-text); }
body:has(.vps-shell) .icon-button { border-color: var(--vps-line); background: var(--vps-surface); color: var(--vps-body); }
body:has(.vps-shell) .icon-button:hover { border-color: var(--vps-line-strong); background: var(--vps-surface-subtle); }
body:has(.vps-shell) .confirmation-details { border-color: var(--vps-line); background: var(--vps-surface-subtle); color: var(--vps-text); }
body:has(.vps-shell) .impact-note { border-left-color: var(--vps-amber); background: var(--vps-amber-soft); color: #674600; }
body:has(.vps-shell) .editor-message { border-color: var(--vps-line); background: var(--vps-surface-subtle); color: var(--vps-body); font-size: 15px; }
body:has(.vps-shell) .editor-message.success { border-color: #9fcbb5; background: var(--vps-green-soft); color: #175b3e; }
body:has(.vps-shell) .editor-message.error { border-color: #e2aeb1; background: var(--vps-red-soft); color: #8c2630; }
body:has(.vps-shell) .editor-message.wait { border-color: #e4ca82; background: var(--vps-amber-soft); color: #674600; }
body:has(.vps-shell) .app-dialog :is(.primary-button, .button.primary) { border-color: var(--vps-teal-strong); background: var(--vps-teal); color: #fff; font-size: 16px; }
body:has(.vps-shell) .app-dialog :is(.secondary-button, .button.secondary) { border-color: var(--vps-line-strong); background: var(--vps-surface); color: var(--vps-text); font-size: 16px; }
body:has(.vps-shell) .app-dialog .danger-button { border-color: #8c2630; background: var(--vps-red); color: #fff; }

/* User request (no tracker ID) | 2026-11-13 | George | Provide predictable keyboard focus, screen-reader hiding, and responsive shared navigation behavior. */
.vps-shell :is(a, button, input, select, textarea, summary):focus-visible,
html[data-vps-platform="true"] .shell :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid #087f78;
  outline-offset: 3px;
}

.vps-shell .vps-menu,
.vps-shell .vps-close,
.vps-shell .vps-backdrop,
html[data-vps-platform="true"] .shell .vps-menu,
html[data-vps-platform="true"] .shell .vps-close,
html[data-vps-platform="true"] .shell .vps-backdrop { display: none; }

.vps-shell .vps-backdrop[hidden],
html[data-vps-platform="true"] .shell .vps-backdrop[hidden] { display: none !important; }

.vps-shell .sr-only,
html[data-vps-platform="true"] .shell .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; }

/* User request (no tracker ID) | 2026-11-13 | George | Replace horizontal phone navigation with a consistent dismissible drawer on narrow screens. */
@media (max-width: 860px) {
  .vps-shell,
  html[data-vps-platform="true"] .shell { display: block; min-height: 100dvh; }

  .vps-shell .vps-rail,
  html[data-vps-platform="true"] .shell .vps-rail,
  html[data-vps-platform="true"] .shell .rail {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(320px, calc(100vw - 52px));
    height: 100dvh;
    transform: translateX(-105%);
    box-shadow: none;
  }

  .vps-shell.nav-open .vps-rail,
  .vps-shell.mobile-open .vps-rail,
  html[data-vps-platform="true"] .shell.nav-open .rail,
  html[data-vps-platform="true"] .shell.mobile-open .rail { transform: translateX(0); box-shadow: 12px 0 36px rgba(18, 42, 50, .2); }

  .vps-shell .vps-menu,
  html[data-vps-platform="true"] .shell .vps-menu { width: 42px; min-height: 42px; display: inline-grid; place-items: center; border: 1px solid var(--vps-line); border-radius: 8px; background: var(--vps-surface); color: var(--vps-text); }

  .vps-shell .vps-close,
  html[data-vps-platform="true"] .shell .vps-close { width: 42px; min-height: 42px; display: inline-grid; place-items: center; border: 1px solid var(--vps-line); border-radius: 8px; background: var(--vps-surface); color: var(--vps-text); }

  .vps-shell .vps-backdrop,
  html[data-vps-platform="true"] .shell .vps-backdrop { position: fixed; inset: 0; z-index: 50; display: block; border: 0; background: rgba(17, 39, 47, .38); }

  .vps-shell .vps-main,
  html[data-vps-platform="true"] .shell .main { min-height: 100dvh; }

  .vps-shell .vps-topbar,
  html[data-vps-platform="true"] .shell .topbar {
    min-height: 56px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 8px 10px;
    padding: 8px 14px;
  }

  .vps-shell .vps-menu,
  html[data-vps-platform="true"] .shell .vps-menu { grid-column: 1; grid-row: 1; }

  .vps-shell .vps-breadcrumbs,
  html[data-vps-platform="true"] .shell .topbar-breadcrumbs { grid-column: 2; grid-row: 1; width: 100%; max-width: none; white-space: normal; overflow-wrap: anywhere; }

  .vps-shell .vps-toolbar,
  html[data-vps-platform="true"] .shell .vps-toolbar { grid-column: 1 / -1; grid-row: 2; width: 100%; justify-content: flex-start; }

  .vps-shell .vps-content,
  .vps-shell .page-wrap,
  html[data-vps-platform="true"] .shell .content { width: 100%; padding: 22px 16px 28px; }

  .vps-shell :is(.overview-grid, .resource-grid, .chart-grid, .host-grid, .web-grid, .connection-grid),
  html[data-vps-platform="true"] .shell :is(.overview-grid, .resource-grid, .chart-grid, .host-grid, .web-grid, .connection-grid) { grid-template-columns: minmax(0, 1fr); }

  .vps-shell .table-scroll,
  html[data-vps-platform="true"] .shell .table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
}

/* User request (no tracker ID) | 2026-11-13 | George | Keep small-screen toolbars, headings, and sign-in controls usable without reducing legibility. */
@media (max-width: 480px) {
  .vps-shell .vps-topbar,
  html[data-vps-platform="true"] .shell .topbar { align-items: center; }

  .vps-shell .vps-breadcrumbs,
  .vps-shell .breadcrumbs,
  html[data-vps-platform="true"] .shell .topbar-breadcrumbs { max-width: none; font-size: 14px; }

  .vps-shell :is(.page-heading, .page-head, .heading),
  html[data-vps-platform="true"] .shell :is(.page-heading, .page-head, .heading) { align-items: flex-start; flex-direction: column; }

  .vps-shell :is(.table-toolbar, .file-toolbar, .file-actions, .form-actions),
  html[data-vps-platform="true"] .shell :is(.table-toolbar, .file-toolbar, .file-actions, .form-actions) { align-items: stretch; flex-wrap: wrap; }

  .vps-shell :is(.table-toolbar > *, .file-toolbar > *, .file-actions > *),
  html[data-vps-platform="true"] .shell :is(.table-toolbar > *, .file-toolbar > *, .file-actions > *) { min-width: min(100%, 180px); }
}

/* User request (no tracker ID) | 2026-11-13 | George | Give account identity and project memberships a full readable line on phones. */
@media (max-width: 640px) {
  .vps-shell[data-page="access"] .user-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .vps-shell[data-page="access"] .user-row-copy { grid-column: 1 / -1; }
  .vps-shell[data-page="access"] .user-row .status { justify-self: start; }
  .vps-shell[data-page="access"] .user-row .button { justify-self: end; }
}

/* User request (no tracker ID) | 2026-11-13 | George | Use shared token and control styling on the standalone recognized-account sign-in route. */
.vps-auth {
  --bg: var(--vps-canvas);
  --panel: var(--vps-surface);
  --border: var(--vps-line);
  --text: var(--vps-text);
  --muted: var(--vps-muted);
  --teal: var(--vps-teal);
  min-height: 100vh;
  background: var(--vps-canvas);
  color: var(--vps-text);
  font: 400 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.vps-auth :is(.login-card, .access-shell > .panel, .panel) { border-color: var(--vps-line); border-radius: 12px; background: var(--vps-surface); color: var(--vps-text); box-shadow: var(--vps-shadow); }
.vps-auth :is(h1, h2, label, strong) { color: var(--vps-text); }
.vps-auth :is(p, .field-help, .intro, .page-footer, footer) { color: var(--vps-body); font-size: 16px; }
.vps-auth :is(input, select, textarea) { min-height: 44px; border-color: var(--vps-line-strong); border-radius: 7px; background: var(--vps-surface); color: var(--vps-text); font: inherit; font-size: 16px; }
.vps-auth :is(button, .primary-button, .text-button, .back-link) { min-height: 44px; color: var(--vps-teal-strong); font: inherit; font-size: 16px; }
.vps-auth .brand-mark { background: var(--vps-teal); color: #fff; box-shadow: none; }
.vps-auth .brand-copy small { color: var(--vps-muted); font-size: 12px; letter-spacing: .08em; }
.vps-auth .primary-button { border-color: var(--vps-teal-strong); background: var(--vps-teal); color: #fff; font-size: 16px; }
.vps-auth .primary-button:hover:not(:disabled) { background: #066f69; color: #fff; }
.vps-auth .access-mark { border-color: #a5d2cf; background: var(--vps-teal-soft); color: var(--vps-teal-strong); }
.vps-auth #request-form label,
.vps-auth .verify-form label { color: var(--vps-text); }
.vps-auth #request-form input,
.vps-auth .verify-form input { border-color: var(--vps-line-strong); background: #fff; color: var(--vps-text); }
.vps-auth #request-form input:focus-visible,
.vps-auth .verify-form input:focus-visible { border-color: var(--vps-teal); background: #fff; color: var(--vps-text); box-shadow: 0 0 0 3px rgba(8, 127, 120, .16); }
.vps-auth #owner-email-display { margin-bottom: 18px; color: var(--vps-muted); letter-spacing: normal; text-align: left; }
.vps-auth .text-button { color: var(--vps-teal-strong); }
.vps-auth .security-note { color: var(--vps-muted); font-size: 14px; }
.vps-auth .page-footer { color: var(--vps-muted); font-size: 14px; }
.vps-auth .page-footer { flex-wrap: wrap; flex-direction: column; text-align: center; }
.vps-auth .notice { border-color: #9fcbb5; background: var(--vps-green-soft); color: #175b3e; font-size: 16px; }
.vps-auth .notice.error { border-color: #e2aeb1; background: var(--vps-red-soft); color: #8c2630; }
.vps-auth .notice.wait { border-color: #e4ca82; background: var(--vps-amber-soft); color: #674600; }
.vps-auth :is(a, button, input, select, textarea):focus-visible { outline: 3px solid var(--vps-teal); outline-offset: 3px; }

/* User request (no tracker ID) | 2026-11-13 | George | Preserve usable transitions for motion-sensitive users. */
@media (prefers-reduced-motion: reduce) {
  .vps-shell *,
  .vps-shell *::before,
  .vps-shell *::after,
  html[data-vps-platform="true"] .shell *,
  html[data-vps-platform="true"] .shell *::before,
  html[data-vps-platform="true"] .shell *::after,
  .vps-auth *,
  .vps-auth *::before,
  .vps-auth *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
