/* PubHub Base Styles */

/* Typography - refined serif/sans pairing */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&display=swap');

/* Global typography and polish (both themes) */
:root {
  --pubhub-font-heading: 'Source Serif 4', Georgia, serif;
  --pubhub-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --pubhub-shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1);
  --pubhub-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
  --pubhub-accent: #6366f1;
  --pubhub-subtle: #8a9aa8;
}

html {
  font-size: 20px;
}

body {
  font-family: var(--pubhub-font-body);
  font-size: 1rem;
}

/* Standard text sizing for content (not headers) */
p, td, th, li, label, span, .text-content {
  font-size: 0.9rem;
}

table {
  font-size: 0.9rem;
}

/* Override Pico container to ensure consistent centering */
main.container {
  max-width: 1400px;
  padding-left: 1rem;
  padding-right: 1rem;
  min-height: 100vh;
  background: transparent;
}

h1, h2, h3, h4 {
  font-family: var(--pubhub-font-heading);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Dark theme refinements */
[data-theme="dark"] {
  --pubhub-accent: #818cf8;
}

[data-theme="dark"] body {
  /* Subtle gradient - no fixed attachment (causes scroll jitter) */
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
}

[data-theme="dark"] .service-card {
  
}

[data-theme="dark"] .team-card:hover,
[data-theme="dark"] .machine-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .login-card {
  
}

[data-theme="dark"] input:focus,
[data-theme="dark"] button:focus {
  border-color: var(--pubhub-accent);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}

[data-theme="dark"] .modal-overlay {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Light theme specific overrides */
[data-theme="light"] {
  --pubhub-font-heading: 'Source Serif 4', Georgia, serif;
  --pubhub-font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --pubhub-bg-warm: #faf9f7;
  --pubhub-bg-card: #ffffff;
  --pubhub-border-soft: rgba(0, 0, 0, 0.08);
  --pubhub-shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
  --pubhub-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --pubhub-text-primary: #1a1a1a;
  --pubhub-text-secondary: #525252;
  --pubhub-accent-warm: #4f46e5;
  --pubhub-subtle: #64748b;
}

[data-theme="light"] body {
  font-family: var(--pubhub-font-body);
  background: #ffffff;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4 {
  font-family: var(--pubhub-font-heading);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--pubhub-text-primary);
}

/* Page loading overlay */
#page-loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--pico-muted-border-color);
  border-top-color: var(--pico-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Login Container */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  background: var(--pico-card-background-color);
  border-radius: 1rem;
  padding: 3rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header .logo {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  color: var(--pico-primary);
}

.login-header h1 {
  margin: 0;
  font-size: 2rem;
}

.login-header .tagline {
  color: var(--pico-muted-color);
  margin: 0.5rem 0 0;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-card input {
  text-align: center;
  font-size: 1rem;
  padding: 0.875rem;
}

.login-card button {
  width: 100%;
}

.error-msg {
  color: var(--pico-del-color);
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
}

.login-toggle {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.8rem;
}

.login-toggle a {
  color: var(--pico-muted-color);
  text-decoration: none;
}

.login-toggle a:hover {
  color: var(--pico-primary);
  text-decoration: underline;
}

/* Main View Container - inherits centering from Pico .container */
#main-view {
  width: 100%;
}

/* Portal Header */
.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.header-left h1 {
  margin: 0;
  font-size: 1.5rem;
}

.version-badge {
  font-size: 0.8rem;
  color: #8b9bb4;
  font-weight: 500;
}

.logo-small {
  width: 32px;
  height: 32px;
  color: var(--pico-primary);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--pico-muted-color);
  text-decoration: none;
  font-size: 0.9rem;
  
}

.nav-link:hover,
.nav-link.active {
  color: var(--pico-primary);
}

.nav-link.logout {
  color: var(--pico-del-color);
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--pico-muted-color);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.25rem;
}

/* Services Filter */
.services-filter {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.services-filter .env-toggle-detail {
  margin-left: auto;
}

/* Environment Toggle */
.env-toggle {
  display: flex;
  gap: 0;
  background: var(--pico-card-background-color);
  border-radius: 0.5rem;
  padding: 0.2rem;
  border: 1px solid var(--pico-muted-border-color);
}

.env-btn {
  background: transparent;
  border: none;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--pico-muted-color);
  cursor: pointer;
  border-radius: 0.35rem;
  
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.env-btn:hover {
  color: var(--pico-color);
}

.env-btn.active {
  background: var(--pico-primary-background);
  color: var(--pico-primary);
}

.env-btn[data-env="production"].active {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.env-btn[data-env="development"].active {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

[data-theme="light"] .env-btn[data-env="production"].active {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

[data-theme="light"] .env-btn[data-env="development"].active {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

/* Environment select in detail page */
/* Environment select/label in detail info grid */
.env-select {
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 1rem;
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
}

.env-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}

.env-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.env-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

.env-label.prod {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.env-label.dev {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

[data-theme="light"] .env-select {
  border-color: rgba(22, 163, 74, 0.4);
  background-color: rgba(22, 163, 74, 0.08);
  color: #16a34a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

[data-theme="light"] .env-label.prod {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.2);
}

[data-theme="light"] .env-label.dev {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.2);
}

.filter-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.services-filter input {
  width: 100%;
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  font-size: 0.9rem;
  border-radius: 0.5rem;
  margin-bottom: 0;
}

.filter-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--pico-muted-color);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  
}

.filter-clear:hover {
  color: var(--pico-color);
}

.filter-wrapper.has-value .filter-clear {
  opacity: 1;
  visibility: visible;
}

.filter-count {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
}

/* Pending services on/off switch */
.pending-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.pending-switch input {
  display: none;
}

.pending-slider {
  position: relative;
  width: 32px;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.pending-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

.pending-switch input:checked + .pending-slider {
  background: #f59e0b;
}

.pending-switch input:checked + .pending-slider::after {
  transform: translateX(14px);
  background: #fff;
}

.pending-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pico-muted-color);
  transition: color 0.2s;
}

.pending-switch input:checked ~ .pending-label {
  color: #f59e0b;
}

.pending-count {
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.7;
}

[data-theme="light"] .pending-slider {
  background: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .pending-slider::after {
  background: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .pending-switch input:checked + .pending-slider {
  background: #d97706;
}

[data-theme="light"] .pending-switch input:checked ~ .pending-label {
  color: #d97706;
}

/* Services Section */
.services-section {
  margin-bottom: 2.5rem;
}

.services-section:last-child {
  margin-bottom: 0;
}

.services-section h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: var(--pico-color);
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.service-card {
  background: var(--pico-card-background-color);
  border-radius: 0.75rem;
  padding: 1.25rem 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  
  border: 2px solid rgba(255, 255, 255, 0.08);
  height: 280px; /* fixed height */
  overflow: hidden;
}

.service-card:hover {
  border: 2px solid #5b9bd5; /* blueish */
}

/* No-access service cards - greyed out but Details button interactive */
.service-card.disabled {
  position: relative;
}

/* Grey out the card content except footer */
.service-card.disabled h3,
.service-card.disabled p,
.service-card.disabled .status-dot,
.service-card.disabled .version-badge,
.service-card.disabled .heartbeat-ts,
.service-card.disabled .service-url,
.service-card.disabled .access-badge {
  opacity: 0.4;
}

/* Details button on disabled cards - full opacity and natural hover */
.service-card.disabled .btn-details {
  opacity: 1;
  
}

.service-card.disabled .btn-details:hover {
  background: #388bfd;
  border-color: #388bfd;
  transform: translateY(-1px);
}

/* Service Status Indicators */
.service-card {
  position: relative;
}

/* Heartbeat timestamp (bottom right) */
.heartbeat-ts {
  position: absolute;
  bottom: 0.2rem;
  right: 0.75rem;
  font-size: 0.8rem;
  font-family: monospace;
  color: rgba(255, 255, 255, 0.5);
}

/* Service URL (bottom left of card) */
.service-url {
  position: absolute;
  bottom: 0.2rem;
  left: 1.75rem; /* flush with content */
  right: 5rem; /* leave room for timestamp on right */
  font-size: 0.8rem;
  font-family: monospace;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-dot {
  position: absolute;
  top: 0.4rem;
  left: 0.6rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pico-muted-color);
  cursor: help;
}

.status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.status-dot.idle {
  background: #f59e0b;
}

.status-dot.offline {
  background: #ef4444;
}

/* Custom tooltip for status dot - abundantly clear */
.status-dot::after {
  content: attr(data-status);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Tooltip arrow */
.status-dot::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 3px;
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
  opacity: 0;
  visibility: hidden;
  
  z-index: 100;
}

.status-dot:hover::after,
.status-dot:hover::before {
  opacity: 1;
  visibility: visible;
}

.service-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  padding-bottom: 0;
  margin-left: 0.75rem;
  margin-right: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 10;
}

.service-footer button {
  position: relative;
  z-index: 11;
  pointer-events: auto;
}

.service-status {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
}

.service-card h3 {
  margin: 0.25rem 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  padding-left: 0.75rem;
  color: rgba(255, 255, 255, 0.95);
}

.service-card p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-size: 0.8rem;
  flex: 1;
  line-height: 1.5;
  padding-left: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Light mode: ensure description text has good contrast */
[data-theme="light"] .service-card p {
  color: #374151;
}

.service-card .service-access {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--pico-muted-border-color);
  font-size: 0.8rem;
  color: var(--pico-muted-color);
}

.access-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 1rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.access-badge.admin { background: rgba(31, 111, 235, 0.15); color: #1f6feb; }
.access-badge.write { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.access-badge.read { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.access-badge.none { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.ud-access-edit { cursor: pointer; }
.ud-access-edit:hover { filter: brightness(1.2); }

/* API/Service type cards (not clickable for SSO) */
.service-card.service-type-api {
  cursor: default;
}

/* Web service card clickable area (title + description) */
.service-card-clickable {
  flex: 1;
}

/* Card header with title and badges */
.service-card .card-header {
  margin-bottom: 0.5rem;
}

.service-card .card-header h3 {
  margin-bottom: 0.4rem;
}

.service-card .card-description {
  flex: 1;
  margin-bottom: 0.5rem;
}

/* Type badges container - spread across width */
.type-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Type badge - refined ghost chip style */
.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--pubhub-font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.6rem;
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  /* Ghost style - border only, no fill */
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  
}

.type-badge::before {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Icons for each type */
.type-badge.type-web::before,
.type-badge.type-website::before { content: "◎"; }
.type-badge.type-service::before { content: "⬡"; }
.type-badge.type-api::before { content: "⬢"; }
.type-badge.type-mcp::before { content: "◈"; }
.type-badge.type-docs::before { content: "▤"; }

/* Hover states - add color accent */
.type-badge:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.type-badge.type-web:hover,
.type-badge.type-website:hover {
  border-color: #22c55e;
  color: #4ade80;
}

.type-badge.type-service:hover,
.type-badge.type-api:hover {
  border-color: #3b82f6;
  color: #60a5fa;
}

.type-badge.type-mcp:hover {
  border-color: #8b5cf6;
  color: #a78bfa;
}

.type-badge.type-docs:hover {
  border-color: #f59e0b;
  color: #fbbf24;
}

/* Inactive/non-clickable badges */
.type-badge.inactive {
  opacity: 0.7;
  cursor: default;
  pointer-events: none;
}


/* Light theme - invert ghost style */
[data-theme="light"] .type-badge {
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .type-badge:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.25);
  color: rgba(0, 0, 0, 0.8);
}

[data-theme="light"] .type-badge.type-web:hover,
[data-theme="light"] .type-badge.type-website:hover {
  border-color: #16a34a;
  color: #16a34a;
}

[data-theme="light"] .type-badge.type-service:hover,
[data-theme="light"] .type-badge.type-api:hover {
  border-color: #2563eb;
  color: #2563eb;
}

[data-theme="light"] .type-badge.type-mcp:hover {
  border-color: #7c3aed;
  color: #7c3aed;
}

[data-theme="light"] .type-badge.type-docs:hover {
  border-color: #d97706;
  color: #d97706;
}

/* Card top-right actions container (version + delete side by side) */
.service-card .card-top-actions {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.service-card .version-badge {
  font-size: 0.8rem;
  font-family: monospace;
  color: rgba(255, 255, 255, 0.85);
  background: transparent;
  padding: 0;
}

/* Inline delete button for service cards (admin only) */
.service-card .btn-delete-inline {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  
  display: flex;
  align-items: center;
}
.service-card .btn-delete-inline svg {
  width: 14px;
  height: 14px;
  stroke: #ef4444;
}
.service-card .btn-delete-inline:hover {
  opacity: 0.7;
}

.api-url {
  font-size: 0.8rem;
  color: var(--pico-primary);
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  background: var(--pico-primary-background);
}

.api-url:hover {
  text-decoration: underline;
}

/* Admin Controls */
.admin-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.btn-admin {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 0.25rem;
  border: 1px solid;
  cursor: pointer;
  margin: 0 0.25rem;
  font-weight: 500;
  
}

.btn-admin.btn-approve {
  background: #238636;
  border-color: #238636;
  color: #fff;
}
.btn-admin.btn-approve:hover {
  background: #2ea043;
}

.btn-admin.btn-enable {
  background: #1f6feb;
  border-color: #1f6feb;
  color: #fff;
}
.btn-admin.btn-enable:hover {
  background: #388bfd;
}

.btn-admin.btn-disable {
  background: transparent;
  border-color: #f0883e;
  color: #f0883e;
}
.btn-admin.btn-disable:hover {
  background: rgba(240, 136, 62, 0.15);
}

.btn-admin.btn-delete {
  background: transparent;
  border-color: #f85149;
  color: #f85149;
}
.btn-admin.btn-delete:hover {
  background: rgba(248, 81, 73, 0.15);
}

/* Icon buttons for table actions */
.btn-icon, .btn-trash {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  opacity: 0.7;
  
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon svg, .btn-trash svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}
.btn-icon {
  color: var(--pico-primary);
}
.btn-trash {
  color: #f85149;
}
.btn-icon:hover, .btn-trash:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* Actions cell - buttons always side by side */
td:has(.btn-icon, .btn-trash) {
  white-space: nowrap;
}
td .btn-icon + .btn-trash,
td .btn-trash + .btn-icon {
  margin-left: 0.5rem;
}

/* Status badges for pending/disabled */
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.status-badge.pending {
  background: rgba(240, 136, 62, 0.2);
  color: #f0883e;
}

.status-badge.disabled {
  background: rgba(248, 81, 73, 0.2);
  color: #f85149;
}

/* Pending/Disabled service cards */
.pending-card, .disabled-card {
  border: 2px dashed var(--pico-muted-border-color);
  opacity: 0.9;
}

.pending-card {
  position: relative;
  overflow: visible;
  padding: 0 0 1rem 0;
}

.pending-card h3 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.pending-card p {
  padding-left: 1rem;
  padding-right: 1rem;
}

.pending-card .admin-controls {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Pending header bar */
.pending-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(240, 136, 62, 0.15);
  border-radius: 0.65rem 0.65rem 0 0;
  margin-bottom: 0.75rem;
}

.pending-date {
  font-size: 0.8rem;
  font-family: monospace;
  color: var(--pico-muted-color);
}

.pending-header .status-badge {
  margin-bottom: 0;
}

.pending-card > .pending-header .env-badge {
  position: absolute;
  top: 0;
  right: 0.75rem;
  transform: translateY(-100%);
  z-index: 1;
  border: 2px solid transparent;
  border-bottom: none;
  border-radius: 0;
}

.pending-card:hover > .pending-header .env-badge {
  border-color: #5b9bd5;
  border-bottom: none;
}

.pending-card > .pending-header .env-badge.production {
  background: #0a3d1f;
}

.pending-card > .pending-header .env-badge.development {
  background: #1e1b4b;
}

.env-badge {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
}

.env-badge.production {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.env-badge.development {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.pending-section h2, .disabled-section h2 {
  color: var(--pico-muted-color);
}

.service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  margin: 0.5rem 0;
}

/* Team Grid - now used for users table */
.team-grid {
  width: 100%;
}

.team-card {
  background: var(--pico-card-background-color);
  border-radius: 0.75rem;
  padding: 1.25rem;
  text-align: center;
  border: 1px solid var(--pico-muted-border-color);
  
}

.team-card.is-you {
  border-color: var(--pico-primary);
}

.team-card .avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--pico-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 auto 1rem;
}

.team-card h4 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.team-card .you-tag {
  font-weight: 400;
  color: var(--pico-primary);
  font-size: 0.85rem;
}

.team-card .team-email {
  color: var(--pico-muted-color);
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  word-break: break-word;
}

.team-card .team-joined {
  color: var(--pico-muted-color);
  margin: 0;
  font-size: 0.8rem;
}

.team-card .team-username {
  color: var(--pico-muted-color);
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
}

.team-card .team-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.5rem 0;
  font-size: 0.8rem;
}

.team-card .user-detail {
  color: var(--pico-muted-color);
  word-break: break-all;
}

.team-card .user-detail strong {
  color: var(--pico-color);
  font-weight: 500;
}

.team-badges {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.team-card .badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  background: var(--pico-primary-background);
  color: var(--pico-primary-inverse);
}

.team-card .badge-totp {
  background: var(--pico-ins-color);
  color: #fff;
}

/* Profile */
.profile-card {
  background: var(--pico-card-background-color);
  border-radius: 0.75rem;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--pico-muted-border-color);
}

.profile-card .profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Avatar Large - used in profile and user detail modal */
.avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--pico-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
  flex-shrink: 0;
}

.profile-info h3 {
  margin: 0 0 0.25rem;
}

.profile-info p {
  color: var(--pico-muted-color);
  margin: 0;
  font-size: 0.875rem;
}

.profile-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.profile-detail {
  padding: 1rem;
  background: var(--pico-background-color);
  border-radius: 0.5rem;
}

.profile-detail label {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  display: block;
  margin-bottom: 0.25rem;
}

.profile-detail span {
  font-weight: 500;
}

/* My API Keys (profile page) */
.my-apikeys {
  background: var(--pico-card-background-color);
  border-radius: 0.5rem;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.my-apikeys .apikeys-list {
  margin-bottom: 0;
}

/* User Link in table */
.user-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed var(--pico-muted-color);
}

.user-link:hover {
  color: var(--pico-primary);
  border-bottom-color: var(--pico-primary);
}

/* User Detail Modal */
.user-detail-modal h5 {
  margin: 1rem 0 0.5rem;
  font-size: 0.85rem;
  color: var(--pico-muted-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.user-detail-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
}

.user-detail-info h4 {
  margin: 0;
  font-size: 1.1rem;
}

.user-detail-info p {
  margin: 0.25rem 0;
  color: var(--pico-muted-color);
}

.user-detail-section {
  background: var(--pico-background-color);
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--pico-muted-border-color);
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  color: var(--pico-muted-color);
  font-size: 0.85rem;
}

.detail-value {
  font-weight: 500;
}

.detail-value code {
  font-size: 0.8rem;
  padding: 0.1rem 0.3rem;
  background: var(--pico-card-background-color);
  border-radius: 0.25rem;
}

/* Machines List */
.machines-list {
  display: grid;
  gap: 1rem;
}

.machine-card {
  background: var(--pico-card-background-color);
  border-radius: 0.5rem;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--pico-muted-border-color);
}

.machine-card h4 {
  margin: 0 0 0.25rem;
}

.machine-card .machine-id {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--pico-muted-color);
}

.machine-card .last-seen {
  text-align: right;
  font-size: 0.8rem;
  color: var(--pico-muted-color);
}

/* Access Summary */
.access-summary {
  margin-bottom: 2rem;
}

.access-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--pico-card-background-color);
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--pico-muted-border-color);
}

.access-table th,
.access-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--pico-muted-border-color);
}

.access-table th {
  background: var(--pico-background-color);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pico-muted-color);
  font-weight: 600;
}

.access-table tbody tr:last-child td {
  border-bottom: none;
}

.access-table tbody tr:hover {
  background: var(--pico-background-color);
}

.access-table tbody tr.no-access {
  opacity: 0.5;
}

.type-badge.small {
  font-size: 0.8rem;
  padding: 0.2rem 0.45rem;
  border-radius: 0.75rem;
}

/* Type badge colors - high contrast */
.type-badge.web { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.type-badge.service { background: rgba(96, 165, 250, 0.2); color: #60a5fa; }
.type-badge.api { background: rgba(251, 146, 60, 0.2); color: #fb923c; }
.type-badge.mcp { background: rgba(168, 85, 247, 0.2); color: #a855f7; }
.type-badge.cli { background: rgba(236, 72, 153, 0.2); color: #ec4899; }
.type-badge.library { background: rgba(20, 184, 166, 0.2); color: #14b8a6; }

[data-theme="light"] .type-badge.web { background: rgba(22, 163, 74, 0.12); color: #16a34a; }
[data-theme="light"] .type-badge.service { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
[data-theme="light"] .type-badge.api { background: rgba(234, 88, 12, 0.12); color: #ea580c; }
[data-theme="light"] .type-badge.mcp { background: rgba(147, 51, 234, 0.12); color: #9333ea; }
[data-theme="light"] .type-badge.cli { background: rgba(219, 39, 119, 0.12); color: #db2777; }
[data-theme="light"] .type-badge.library { background: rgba(13, 148, 136, 0.12); color: #0d9488; }

/* Tool Access Levels Table */
.tool-access-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--pico-card-background-color);
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--pico-muted-border-color);
  margin-bottom: 1.5rem;
}

.tool-access-table th,
.tool-access-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--pico-muted-border-color);
  vertical-align: middle;
}

.tool-access-table th {
  background: var(--pico-background-color);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pico-muted-color);
  font-weight: 600;
}

.tool-access-table tbody tr:last-child td {
  border-bottom: none;
}

.tool-list code {
  display: inline-block;
  background: var(--pico-background-color);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  margin: 0.1rem;
  border: 1px solid var(--pico-muted-border-color);
}

/* Editable Tool Access Table (for admins) */
.tool-access-table-editable {
  width: 100%;
  border-collapse: collapse;
  background: var(--pico-card-background-color);
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--pico-muted-border-color);
  margin-bottom: 0.5rem;
}

.tool-access-table-editable th,
.tool-access-table-editable td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--pico-muted-border-color);
  vertical-align: middle;
}

.tool-access-table-editable th {
  background: var(--pico-background-color);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pico-muted-color);
  font-weight: 600;
}

.tool-access-table-editable tbody tr:last-child td {
  border-bottom: none;
}

.tool-access-table-editable tbody tr:hover {
  background: var(--pico-background-color);
}

.tool-access-table-editable code {
  font-size: 0.8rem;
  background: transparent;
  padding: 0;
  vertical-align: middle;
}

/* Ensure all content in tool table cells is vertically centered */
.tool-access-table td,
.tool-access-table-editable td {
  vertical-align: middle !important;
}

.tool-access-table td > *,
.tool-access-table-editable td > * {
  vertical-align: middle;
}

/* Tool description column */
.tool-description {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  line-height: 1.4;
  max-width: 400px;
}

.tool-access-table .tool-description,
.tool-access-table-editable .tool-description {
  font-size: 0.8rem;
}

/* Level group header row */
.level-group-header td {
  background: var(--pico-card-background-color);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 1rem 0.75rem 0.75rem !important;
  border-bottom: none !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.level-group-header:first-child td {
  padding-top: 0.5rem !important;
}

.level-group-header:hover td {
  background: var(--pico-card-background-color) !important;
}

.level-group-header .access-badge {
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
}

/* Tool level dropdown */
.tool-level-select {
  padding: 0.35rem 1.75rem 0.35rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 500;
  border: 2px solid var(--pico-muted-border-color);
  border-radius: 0.3rem;
  background: var(--pico-background-color);
  color: var(--pico-color);
  cursor: pointer;
  width: 100px;
  vertical-align: middle;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  background-size: 0.75rem;
  
}

.tool-level-select:hover {
  border-color: var(--pico-primary);
  background-color: rgba(31, 111, 235, 0.05);
}

.tool-level-select:focus {
  outline: none;
  border-color: var(--pico-primary);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.25);
}

/* Reset button per tool */
.btn-reset-tool {
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 0.25rem;
  background: transparent;
  color: var(--pico-muted-color);
  cursor: pointer;
  
  vertical-align: middle;
  margin: 0;
}

.btn-reset-tool:hover:not(:disabled) {
  border-color: var(--pico-primary);
  color: var(--pico-primary);
  background: rgba(31, 111, 235, 0.1);
}

.btn-reset-tool:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Default level display */
.tool-default {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
}

.tool-default.customized {
  color: #f59e0b;
  font-weight: 500;
}

/* Reset all button */
.btn-reset-all {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 0.25rem;
  background: transparent;
  color: var(--pico-muted-color);
  cursor: pointer;
  
}

.btn-reset-all:hover {
  border-color: #f59e0b;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

/* Light mode: Editable Tool Access Table */
[data-theme="light"] .tool-access-table-editable {
  border-color: #e5e7eb;
}

[data-theme="light"] .tool-access-table-editable th {
  background: #f9fafb;
}

[data-theme="light"] .tool-access-table-editable th,
[data-theme="light"] .tool-access-table-editable td {
  border-color: #e5e7eb;
}

[data-theme="light"] .tool-level-select {
  background: #fff;
  border-color: #d1d5db;
}

[data-theme="light"] .btn-reset-tool,
[data-theme="light"] .btn-reset-all {
  border-color: #d1d5db;
}

/* Pages */
.page {
  animation: fadeIn 0.2s ease;
}

.page h2 {
  margin-bottom: 1.5rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
  .portal-header {
    flex-direction: column;
    gap: 1rem;
  }

  .header-nav {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Service Detail Page */
.service-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.back-link {
  color: var(--pico-primary);
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link:hover {
  text-decoration: underline;
}

.service-detail-card {
  background: var(--pico-card-background-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--pico-muted-border-color);
}

.service-detail-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.service-detail-header-info {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.service-status-indicator {
  padding-top: 0.5rem;
}

.service-status-indicator .status-dot {
  position: relative;
  top: auto;
  left: auto;
}

.service-title-section {
  flex: 1;
}

.service-title-section h2 {
  margin: 0 0 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.service-id {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  margin: 0;
}

.service-version {
  font-family: monospace;
  font-size: 1rem;
  color: var(--pico-muted-color);
}

/* Status indicator in top right corner */
.service-status-corner {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  padding: 0.25rem 0.5rem;
}

.status-dot-corner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.status-text-corner {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.service-status-corner.online { color: #22c55e; }
.service-status-corner.idle { color: #f59e0b; }
.service-status-corner.offline { color: #ef4444; }

.service-description {
  color: var(--pico-muted-color);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

/* Service Detail - Environment + Types Row */
.service-env-types-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.types-section-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.types-label {
  color: var(--pico-muted-color);
  font-size: 0.85rem;
}

.lastseen-section {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.lastseen-section .heartbeat-label {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  white-space: nowrap;
}

.env-section {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex: 1;
}

.types-section {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex: 1;
}

/* Medium-sized environment dropdown */
.env-select-medium {
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: 1px solid rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}

.env-select-medium:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}

.env-label-medium {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 0.375rem;
}

.env-label-medium.prod {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.env-label-medium.dev {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.3);
}

/* Current environment label */
.env-current {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.env-current.prod {
  color: #22c55e;
}

.env-current.dev {
  color: #f59e0b;
}

/* Environment toggle in detail page */
.env-toggle-detail {
  display: inline-flex;
  background: rgba(0,0,0,0.2);
  border-radius: 0.375rem;
  padding: 2px;
}

.env-toggle-detail .env-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--pico-muted-color);
  cursor: pointer;
  border-radius: 0.25rem;
  
}

.env-toggle-detail .env-btn:hover {
  color: var(--pico-color);
}

.env-toggle-detail .env-btn.active {
  background: var(--pico-primary-background);
  color: var(--pico-primary-inverse);
}

/* Production = muted sage-teal (stable), Development = warm ochre (active) */
.env-toggle-detail .env-btn[data-env="production"].active,
.env-toggle-detail .env-btn:first-child.active {
  background: #3d7c6c;
  color: rgba(255,255,255,0.95);
}

.env-toggle-detail .env-btn[data-env="development"].active,
.env-toggle-detail .env-btn:last-child.active {
  background: #b8860b;
  color: rgba(255,255,255,0.95);
}

[data-theme="light"] .env-toggle-detail {
  background: rgba(0,0,0,0.06);
}

/* Inline status indicator */
.status-indicator-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--pico-muted-color);
}

.status-indicator-inline.online { color: #22c55e; }
.status-indicator-inline.idle { color: #f59e0b; }
.status-indicator-inline.offline { color: #ef4444; }

.status-dot-small {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.heartbeat-inline {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  white-space: nowrap;
}

[data-theme="light"] .env-select-medium {
  border-color: rgba(22, 163, 74, 0.5);
  background-color: rgba(22, 163, 74, 0.08);
  color: #16a34a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

[data-theme="light"] .env-label-medium.prod {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.3);
}

[data-theme="light"] .env-label-medium.dev {
  background: rgba(234, 88, 12, 0.1);
  color: #ea580c;
  border-color: rgba(234, 88, 12, 0.3);
}

.service-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.meta-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pico-muted-color);
  font-weight: 600;
}

.meta-value {
  color: var(--pico-color);
}

.meta-value.mono {
  font-family: monospace;
  font-size: 0.8rem;
}

/* Legacy status-text classes */
.status-text.online { color: #22c55e; }
.status-text.idle { color: #f59e0b; }
.status-text.offline { color: #ef4444; }

.service-urls {
  margin-bottom: 1.5rem;
}

.url-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--pico-muted-border-color);
}

.url-item:last-child {
  border-bottom: none;
}

.url-type {
  font-size: 0.8rem;
  text-transform: uppercase;
  background: var(--pico-muted-color);
  color: #fff;
  padding: 0.15rem 0.4rem;
  border-radius: 0.2rem;
  min-width: 50px;
  text-align: center;
}

.url-item a {
  font-family: monospace;
  font-size: 0.85rem;
  word-break: break-all;
}

.service-admin-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}

.service-admin-actions .btn-admin {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 0.375rem;
}

/* Access sections wrapper with flex gap */
.service-access-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.service-users-section,
.service-services-section,
.service-clients-section {
  background: var(--pico-card-background-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--pico-muted-border-color);
}

.service-users-section h3,
.service-services-section h3,
.service-clients-section h3 {
  margin: 0 0 1rem;
}

/* Section hint text */
.section-hint {
  color: var(--pico-muted-color);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

/* Details button style */
.btn-admin.btn-details {
  background: #1f6feb;
  border-color: #1f6feb;
  color: #fff;
}

.btn-admin.btn-details:hover {
  background: #388bfd;
}

/* Small button variant */
.btn-admin.btn-small {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

/* Light mode adjustments */
[data-theme="light"] .login-card {
  background: var(--pubhub-bg-card);
  box-shadow: var(--pubhub-shadow-subtle), 0 0 0 1px var(--pubhub-border-soft);
  border: none;
  
}

[data-theme="light"] .login-header h1 {
  font-family: var(--pubhub-font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

[data-theme="light"] .service-card {
  background: var(--pubhub-bg-card);
  border: 1px solid var(--pubhub-border-soft);
  box-shadow: var(--pubhub-shadow-subtle);
  
}

[data-theme="light"] .service-card:hover {
  border: 1px solid rgba(79, 70, 229, 0.3);
}

[data-theme="light"] .service-card h3 {
  font-family: var(--pubhub-font-heading);
  font-weight: 600;
}

[data-theme="light"] .team-card,
[data-theme="light"] .profile-card,
[data-theme="light"] .machine-card {
  background: var(--pubhub-bg-card);
  border: 1px solid var(--pubhub-border-soft);
  box-shadow: var(--pubhub-shadow-subtle);
  
}

[data-theme="light"] .team-card:hover,
[data-theme="light"] .machine-card:hover {
  box-shadow: var(--pubhub-shadow-hover);
  transform: translateY(-1px);
}

[data-theme="light"] .team-card.is-you {
  border-color: var(--pubhub-accent-warm);
  box-shadow: var(--pubhub-shadow-subtle), 0 0 0 1px rgba(79, 70, 229, 0.15);
}

/* Light mode: Header refinements */
[data-theme="light"] .portal-header {
  border-bottom: 1px solid var(--pubhub-border-soft);
  background: linear-gradient(to bottom, #ffffff, #fafafa);
  margin-left: -1rem;
  margin-right: -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

[data-theme="light"] .header-left h1 {
  font-family: var(--pubhub-font-heading);
  font-weight: 700;
}

[data-theme="light"] .nav-link {
  color: var(--pubhub-text-secondary);
  font-weight: 500;
  
  position: relative;
}

[data-theme="light"] .nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--pubhub-accent-warm);
  transform: scaleX(0);
  
  border-radius: 1px;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
  color: var(--pubhub-accent-warm);
}

[data-theme="light"] .nav-link.active::after {
  transform: scaleX(1);
}

[data-theme="light"] .version-badge {
  color: var(--pubhub-text-secondary);
  opacity: 0.7;
}

[data-theme="light"] .service-footer,
[data-theme="light"] .service-card .service-access {
  border-color: #e5e7eb;
}

[data-theme="light"] .heartbeat-ts {
  color: rgba(0, 0, 0, 0.45);
}

[data-theme="light"] .service-card .version-badge {
  color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .service-url {
  color: rgba(0, 0, 0, 0.45);
}

[data-theme="light"] .filter-clear {
  color: #6b7280;
}

[data-theme="light"] .filter-clear:hover {
  color: #374151;
}

[data-theme="light"] .access-search-input {
  border-color: var(--pubhub-border-soft);
  background: var(--pubhub-bg-warm);
}
[data-theme="light"] .grant-user-list {
  border-color: var(--pubhub-border-soft);
  background: var(--pubhub-bg-warm);
}
[data-theme="light"] .grant-user-row:hover {
  background: rgba(79, 70, 229, 0.05);
}

[data-theme="light"] .access-table {
  border: 1px solid var(--pubhub-border-soft);
  box-shadow: var(--pubhub-shadow-subtle);
  background: var(--pubhub-bg-card);
}

[data-theme="light"] .access-table th {
  background: var(--pubhub-bg-warm);
  font-family: var(--pubhub-font-body);
  font-weight: 600;
}

[data-theme="light"] .access-table th,
[data-theme="light"] .access-table td {
  border-color: var(--pubhub-border-soft);
}

[data-theme="light"] .access-table tbody tr:hover {
  background: rgba(79, 70, 229, 0.02);
}

[data-theme="light"] .profile-detail {
  background: var(--pubhub-bg-warm);
  border: 1px solid var(--pubhub-border-soft);
}

[data-theme="light"] .status-dot::after {
  background: rgba(0, 0, 0, 0.85);
}

[data-theme="light"] .status-dot::before {
  border-top-color: rgba(0, 0, 0, 0.85);
}

/* WCAG AA compliant contrast (4.5:1 minimum) for secondary text */
[data-theme="light"] .team-card .team-email {
  color: #4b5563;
}

[data-theme="light"] .team-card .team-joined {
  color: #6b7280;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-container {
  background: var(--pico-card-background-color);
  border-radius: 0.75rem;
  width: 100%;
  max-width: 550px;
  max-height: 90vh;
  overflow: hidden;
  border: 2px solid var(--pico-primary);
  box-shadow: 0 0 0 1px rgba(31, 111, 235, 0.3), 0 16px 48px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--pico-muted-color);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: var(--pico-color);
}

.modal-body {
  padding: 1.25rem;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--pico-muted-border-color);
}

.btn-modal {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid;
  
}

.btn-modal.btn-cancel {
  background: transparent;
  border-color: var(--pico-muted-border-color);
  color: #c8d1da;
}

.btn-modal.btn-cancel:hover {
  background: var(--pico-muted-border-color);
  color: var(--pico-color);
}

.btn-modal.btn-confirm {
  background: #238636;
  border-color: #238636;
  color: #fff;
}

.btn-modal.btn-confirm:hover {
  background: #2ea043;
}

.btn-modal.btn-danger {
  background: #f85149;
  border-color: #f85149;
  color: #fff;
}

.btn-modal.btn-danger:hover {
  background: #ff6b61;
}

/* Modal form elements */
.modal-field {
  margin-bottom: 1rem;
}

.modal-field:last-child {
  margin-bottom: 0;
}

.modal-field > label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: #7eb8da;
}

.modal-field select,
.modal-field input:not([type="checkbox"]) {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  border: 2px solid var(--pico-muted-border-color);
  border-radius: 0.375rem;
  background-color: var(--pico-background-color);
  color: var(--pico-color);
  -webkit-text-fill-color: var(--pico-color);
  opacity: 1;
  
}

.modal-field input::placeholder {
  color: var(--pico-muted-color);
  -webkit-text-fill-color: var(--pico-muted-color);
  opacity: 0.7;
}

.modal-field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.5rem;
  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='%238b949e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  cursor: pointer;
  color: #e6edf3 !important;
  -webkit-text-fill-color: #e6edf3 !important;
  min-width: 120px;
  text-overflow: ellipsis;
}

.modal-field select option {
  background: var(--pico-background-color);
  color: var(--pico-color);
  padding: 0.5rem;
}

.modal-field select:hover {
  border-color: var(--pico-primary);
}

.modal-field select:focus,
.modal-field input:not([type="checkbox"]):focus {
  outline: none;
  border-color: var(--pico-primary);
  box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.2);
}

.modal-field .field-hint {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  margin-top: 0.25rem;
}

.modal-message {
  padding: 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.modal-message.success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.modal-message.error {
  background: rgba(248, 81, 73, 0.15);
  color: #f85149;
}

/* Light mode: Modal */
[data-theme="light"] .modal-overlay {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

[data-theme="light"] .modal-container {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.2), 0 24px 48px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(0, 0, 0, 0.1);
  border: 2px solid var(--pico-primary);
}

[data-theme="light"] .modal-header {
  border-color: var(--pubhub-border-soft);
}

[data-theme="light"] .modal-header h3 {
  font-family: var(--pubhub-font-heading);
}

[data-theme="light"] .modal-footer {
  border-color: var(--pubhub-border-soft);
  background: var(--pubhub-bg-warm);
}

[data-theme="light"] .modal-field select,
[data-theme="light"] .modal-field input:not([type="checkbox"]) {
  background-color: #fff;
  border-color: #d1d5db;
  color: #1f2937;
  -webkit-text-fill-color: #1f2937;
}

[data-theme="light"] .modal-field input::placeholder {
  color: #9ca3af;
  -webkit-text-fill-color: #9ca3af;
  opacity: 1;
}

[data-theme="light"] .modal-field select {
  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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  color: #1f2937 !important;
  -webkit-text-fill-color: #1f2937 !important;
}

[data-theme="light"] .modal-field select option {
  background: #fff;
  color: #1f2937;
}

/* Light mode: Service detail page */
[data-theme="light"] .service-detail-card,
[data-theme="light"] .service-users-section,
[data-theme="light"] .service-services-section,
[data-theme="light"] .service-clients-section {
  border-color: #d1d5db;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .section-hint {
  color: #6b7280;
}

[data-theme="light"] .service-info-grid {
  background: linear-gradient(135deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.04) 100%);
  border-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .info-item {
  background: rgba(255,255,255,0.7);
  border-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .info-item:hover {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.12);
}

[data-theme="light"] .info-item code {
  background: rgba(0,0,0,0.06);
}

[data-theme="light"] .service-description {
  color: #4b5563;
}

[data-theme="light"] .url-item {
  border-color: #e5e7eb;
}

/* Users Table */
.users-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--pico-card-background-color);
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--pico-muted-border-color);
  table-layout: fixed;
}

.users-table th,
.users-table td {
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--pico-muted-border-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.users-table th {
  background: var(--pico-background-color);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pico-muted-color);
  font-weight: 600;
}

.users-table tbody tr:last-child td {
  border-bottom: none;
}

.users-table tbody tr.user-row {
  cursor: pointer;
}

.users-table tbody tr.user-row:hover {
  background: rgba(31, 111, 235, 0.06);
}

.users-table .row-highlight {
  background: rgba(31, 111, 235, 0.08);
}

.users-table .row-highlight:hover {
  background: rgba(31, 111, 235, 0.12);
}

.users-table .col-avatar {
  width: 56px;
  padding-right: 0;
}

.users-table .col-user {
  width: 20%;
}

.users-table .col-email {
  width: 25%;
  font-size: 0.8em;
}

.users-table .col-status {
  width: 15%;
}

.users-table .col-joined {
  width: 10%;
  font-size: 0.8em;
}

.users-table .col-updated {
  width: 10%;
  font-size: 0.8em;
}

.users-table .col-actions {
  width: 240px;
  text-align: center;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
}

.users-table .col-delete {
  width: 50px;
  text-align: center;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
}

/* Avatar Small */
.avatar-small {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  /* background set via inline style from user.color or getUserColor() */
}

/* User Name and Handle */
.user-name {
  font-weight: 500;
  color: var(--pico-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.user-handle {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
}

/* You Badge */
.you-badge {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--pico-primary);
  background: rgba(31, 111, 235, 0.15);
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
}

/* Status Pills */
.status-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-pill.status-admin {
  background: rgba(31, 111, 235, 0.15);
  color: #1f6feb;
}

.status-pill.status-2fa {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

/* Action Buttons */
.detail-item-actions {
  flex-direction: column;
  gap: 0.35rem;
}

.detail-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-link {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--pico-primary);
  background: transparent;
  border: 1px solid var(--pico-primary);
  border-radius: 0.375rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-link:hover {
  background: var(--pico-primary);
  color: #fff;
}

.btn-link.btn-link-muted {
  color: var(--pico-muted-color);
  border-color: var(--pico-muted-border-color);
}

.btn-link.btn-link-muted:hover {
  background: var(--pico-muted-color);
  color: #fff;
}

.btn-link.btn-link-danger {
  color: #f85149;
  border-color: #f85149;
}

.btn-link.btn-link-danger:hover {
  background: #f85149;
  color: #fff;
}

/* Icon Buttons */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 0.375rem;
  cursor: pointer;
  
  color: var(--pico-muted-color);
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

.btn-icon:hover {
  background: var(--pico-background-color);
  color: var(--pico-color);
  border-color: var(--pico-color);
}

.btn-icon.btn-icon-danger {
  color: #f85149;
  border-color: rgba(248, 81, 73, 0.4);
}

.btn-icon.btn-icon-danger:hover {
  background: rgba(248, 81, 73, 0.1);
  border-color: #f85149;
}

/* Text Utilities */
.text-muted {
  color: var(--pubhub-subtle);
}

.error-text {
  color: #f85149;
}

/* Modal Form */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.modal-hint {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--pico-muted-border-color);
}

/* Color Input Row */
.color-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.color-picker {
  width: 48px;
  height: 38px;
  padding: 0.25rem;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 0.375rem;
  cursor: pointer;
  background: var(--pico-background-color);
}

.color-picker::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.color-picker::-webkit-color-swatch {
  border-radius: 0.25rem;
  border: none;
}

.color-text {
  flex: 1;
  font-family: monospace;
}

/* Access Modal Table */
.access-search-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  border: 2px solid var(--pico-muted-border-color);
  border-radius: 0.375rem;
  background: var(--pico-background-color);
  color: var(--pico-color);
}
.access-search-input:focus {
  outline: none;
  border-color: var(--pico-primary);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.25);
}

.grant-user-list {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 0.375rem;
  padding: 0.25rem 0;
}
.grant-user-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
}
.grant-user-row:hover {
  background: rgba(99, 102, 241, 0.08);
}
.grant-user-check {
  margin: 0;
  accent-color: var(--pico-primary);
}

.access-table {
  width: 100%;
}

.access-table .access-service {
  font-weight: 500;
  white-space: nowrap;
}

.access-table .access-level {
  width: 1%;
  white-space: nowrap;
}

.access-select {
  width: auto;
  min-width: 110px;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  border: 2px solid var(--pico-muted-border-color);
  border-radius: 0.375rem;
  background: var(--pico-background-color);
  color: var(--pico-color);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 0.9rem;
  
}

.access-select:hover {
  border-color: var(--pico-primary);
  background-color: rgba(31, 111, 235, 0.05);
}

.access-select:focus {
  outline: none;
  border-color: var(--pico-primary);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.25);
}

/* Light mode: Users Table */
[data-theme="light"] .users-table {
  border: 1px solid var(--pubhub-border-soft);
  box-shadow: var(--pubhub-shadow-subtle);
  background: var(--pubhub-bg-card);
}

[data-theme="light"] .users-table th {
  background: var(--pubhub-bg-warm);
  font-family: var(--pubhub-font-body);
  font-weight: 600;
}

[data-theme="light"] .users-table th,
[data-theme="light"] .users-table td {
  border-color: var(--pubhub-border-soft);
}

[data-theme="light"] .users-table tbody tr.user-row:hover {
  background: rgba(79, 70, 229, 0.03);
}

[data-theme="light"] .users-table .row-highlight {
  background: rgba(79, 70, 229, 0.04);
}

[data-theme="light"] .users-table .row-highlight:hover {
  background: rgba(79, 70, 229, 0.07);
}

[data-theme="light"] .status-pill.status-admin {
  background: rgba(31, 111, 235, 0.12);
}

[data-theme="light"] .status-pill.status-2fa {
  background: rgba(34, 197, 94, 0.12);
}

[data-theme="light"] .color-picker {
  background: #fff;
  border-color: #d1d5db;
}

[data-theme="light"] .access-select {
  background: #fff;
  border-color: #d1d5db;
}

/* Page Header (title + action button) */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header h2 {
  margin: 0;
}

/* Checkbox Field */
.checkbox-field {
  display: flex;
  align-items: center;
}

.checkbox-field label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--pico-color);
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

/* API Keys Container */
.apikeys-container {
  min-height: 150px;
}

.apikeys-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.apikey-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--pico-background-color);
  border-radius: 0.5rem;
  border: 1px solid var(--pico-muted-border-color);
}

.apikey-info {
  flex: 1;
  min-width: 0;
}

.apikey-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.apikey-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}

.apikey-meta code {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  background: transparent;
}

.apikey-type {
  font-size: 0.8rem;
  text-transform: uppercase;
  background: var(--pico-muted-border-color);
  color: var(--pico-color);
  padding: 0.1rem 0.4rem;
  border-radius: 0.2rem;
}

.apikey-date {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
}

/* API Key Display (for new key) */
.apikey-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--pico-background-color);
  border-radius: 0.5rem;
  border: 1px solid var(--pico-muted-border-color);
}

.apikey-display code {
  flex: 1;
  font-size: 0.8rem;
  word-break: break-all;
  background: transparent;
  color: var(--pico-color);
}

.btn-copy {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--pico-primary);
  color: #fff;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  
  white-space: nowrap;
}

.btn-copy:hover {
  background: #388bfd;
}

/* Light mode: API Keys */
[data-theme="light"] .apikey-item {
  background: #f9fafb;
  border-color: #e5e7eb;
}

[data-theme="light"] .apikey-display {
  background: #f9fafb;
  border-color: #e5e7eb;
}

[data-theme="light"] .apikey-type {
  background: #e5e7eb;
}

/* Client API Keys Page */
.clients-grid {
  width: 100%;
}

.clients-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--pico-card-background-color);
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--pico-muted-border-color);
}

.clients-table th,
.clients-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--pico-muted-border-color);
}

.clients-table th {
  background: var(--pico-background-color);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pico-muted-color);
  font-weight: 600;
}

.clients-table tbody tr:last-child td {
  border-bottom: none;
}

.clients-table tbody tr.client-row {
  cursor: pointer;
}

.clients-table tbody tr.client-row:hover {
  background: rgba(31, 111, 235, 0.06);
}

.clients-table .col-client {
  width: 25%;
}

.clients-table .col-email {
  width: 20%;
  font-size: 0.85rem;
}

.clients-table .col-status {
  width: 10%;
}

.clients-table .col-created,
.clients-table .col-used {
  width: 10%;
  font-size: 0.8rem;
}

.clients-table .col-actions {
  width: 260px;
  text-align: center;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
}

.clients-table .col-delete {
  width: 50px;
  text-align: center;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
}

/* Client Link (matches user-link) */
.client-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed var(--pico-muted-color);
}

.client-link:hover {
  color: var(--pico-primary);
  border-bottom-color: var(--pico-primary);
}

.client-name {
  font-weight: 600;
}

.client-prefix {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
}

.client-prefix code {
  background: transparent;
}

/* Status pills for enabled/disabled */
.status-pill.status-enabled {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.status-pill.status-disabled {
  background: rgba(248, 81, 73, 0.15);
  color: #f85149;
}

/* Client Detail Card */
.client-detail-card {
  background: var(--pico-card-background-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--pico-muted-border-color);
}

.client-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.client-title-section h2 {
  margin: 0 0 0.25rem;
}

.client-id {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  margin: 0;
}

.client-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.client-notes {
  background: var(--pico-background-color);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.client-notes label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pico-muted-color);
  margin-bottom: 0.5rem;
}

.client-notes p {
  margin: 0;
  white-space: pre-wrap;
}

.client-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--pico-muted-border-color);
}

/* Client access section */
.client-access-section {
  background: var(--pico-background-color);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.client-access-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.client-access-section .section-header label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pico-muted-color);
  margin: 0;
}

.client-access-section .access-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Access button style */
.btn-admin.btn-access {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: #fff;
}

.btn-admin.btn-access:hover {
  background: #a78bfa;
}

/* Rotate button style */
.btn-admin.btn-rotate {
  background: transparent;
  border-color: #f59e0b;
  color: #f59e0b;
}

.btn-admin.btn-rotate:hover {
  background: rgba(245, 158, 11, 0.15);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--pico-card-background-color);
  border-radius: 0.75rem;
  border: 1px dashed var(--pico-muted-border-color);
}

.empty-state p {
  margin: 0.5rem 0;
}

/* Modal textarea */
.modal-field textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 0.375rem;
  background-color: var(--pico-background-color);
  color: var(--pico-color);
  resize: vertical;
  min-height: 80px;
}

.modal-field textarea:focus {
  outline: none;
  border-color: var(--pico-primary);
  box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.2);
}

/* Light mode: Clients */
[data-theme="light"] .clients-table {
  border: 1px solid var(--pubhub-border-soft);
  box-shadow: var(--pubhub-shadow-subtle);
  background: var(--pubhub-bg-card);
}

[data-theme="light"] .clients-table th {
  background: var(--pubhub-bg-warm);
  font-family: var(--pubhub-font-body);
  font-weight: 600;
}

[data-theme="light"] .clients-table th,
[data-theme="light"] .clients-table td {
  border-color: var(--pubhub-border-soft);
}

[data-theme="light"] .clients-table tbody tr.client-row:hover {
  background: rgba(79, 70, 229, 0.03);
}

[data-theme="light"] .client-detail-card {
  background: var(--pubhub-bg-card);
  border: 1px solid var(--pubhub-border-soft);
  box-shadow: var(--pubhub-shadow-subtle);
}

[data-theme="light"] .client-detail-card h2 {
  font-family: var(--pubhub-font-heading);
}

[data-theme="light"] .client-notes {
  background: var(--pubhub-bg-warm);
  border: 1px solid var(--pubhub-border-soft);
}

[data-theme="light"] .client-actions {
  border-color: var(--pubhub-border-soft);
}

[data-theme="light"] .empty-state {
  background: var(--pubhub-bg-card);
  border: 1px dashed rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .modal-field textarea {
  background-color: var(--pubhub-bg-card);
  border: 1px solid var(--pubhub-border-soft);
  
}

[data-theme="light"] .modal-field textarea:focus {
  border-color: var(--pubhub-accent-warm);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Light mode: Form inputs */
[data-theme="light"] .services-filter input,
[data-theme="light"] .login-card input {
  background: var(--pubhub-bg-card);
  border: 1px solid var(--pubhub-border-soft);
  
}

[data-theme="light"] .services-filter input:focus,
[data-theme="light"] .login-card input:focus {
  border-color: var(--pubhub-accent-warm);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  outline: none;
}

/* Light mode: Buttons */
[data-theme="light"] .login-card button[type="submit"] {
  background: var(--pubhub-accent-warm);
  border-color: var(--pubhub-accent-warm);
  
}

[data-theme="light"] .login-card button[type="submit"]:hover {
  background: #4338ca;
  transform: translateY(-1px);
}

/* Light mode: Access badges with refined colors */
[data-theme="light"] .access-badge.admin {
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
}

[data-theme="light"] .access-badge.write {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

[data-theme="light"] .access-badge.read {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

/* Light mode: Section headers */
[data-theme="light"] .services-section h2,
[data-theme="light"] .page-header h2,
[data-theme="light"] #page-profile h2,
[data-theme="light"] #page-profile h3 {
  font-family: var(--pubhub-font-heading);
}

/* Autocomplete (Contact Search) */
.autocomplete-wrapper {
  position: relative;
}

.autocomplete-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--pico-card-background-color);
  border: 2px solid var(--pico-primary);
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  max-height: 280px;
  overflow-y: auto;
  z-index: 100;
  margin-top: 0.25rem;
}

.autocomplete-results::before {
  content: 'Select a contact';
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pico-muted-color);
  background: rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid var(--pico-muted-border-color);
}

.autocomplete-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--pico-muted-border-color);
  border-left: 3px solid transparent;
  
}

.autocomplete-item::before {
  content: '';
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--pico-primary) 0%, var(--pico-primary-hover) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: rgba(31, 111, 235, 0.15);
  border-left-color: var(--pico-primary);
}

.autocomplete-item.no-results {
  color: var(--pico-muted-color);
  cursor: default;
  font-style: italic;
  justify-content: center;
  padding: 1.25rem;
}

.autocomplete-item.no-results::before {
  display: none;
}

.autocomplete-item.no-results:hover {
  background: none;
  border-left-color: transparent;
}

.autocomplete-item .contact-info {
  flex: 1;
  min-width: 0;
}

.autocomplete-item .contact-name {
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: var(--pico-color);
}

.autocomplete-item .contact-name .company {
  font-weight: 400;
  color: var(--pico-muted-color);
  font-size: 0.85em;
}

.autocomplete-item .contact-email {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
}

.autocomplete-item .contact-select-hint {
  font-size: 0.8rem;
  color: var(--pico-primary);
  opacity: 0;
  
  margin-top: 0.25rem;
}

.autocomplete-item:hover .contact-select-hint {
  opacity: 1;
}

[data-theme="light"] .autocomplete-results {
  background: var(--pubhub-bg-card);
  border-color: var(--pico-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .autocomplete-results::before {
  background: rgba(0, 0, 0, 0.03);
  border-color: var(--pubhub-border-soft);
}

[data-theme="light"] .autocomplete-item:hover {
  background: rgba(79, 70, 229, 0.08);
}

[data-theme="light"] .autocomplete-item {
  border-color: var(--pubhub-border-soft);
}

/* Selected Contact Card */
.selected-contact-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--pico-background-color);
  border: 1px solid var(--pico-primary);
  border-radius: 0.375rem;
  margin-top: 0.5rem;
}

.selected-contact-info {
  flex: 1;
}

.selected-contact-name {
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.selected-contact-name .company {
  font-weight: 400;
  color: var(--pico-muted-color);
}

.selected-contact-email {
  font-size: 0.85rem;
  color: var(--pico-muted-color);
  margin-bottom: 0.15rem;
}

.selected-contact-id {
  font-size: 0.8rem;
}

.selected-contact-id code {
  background: transparent;
  color: var(--pico-muted-color);
}

.btn-change-contact {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--pico-primary);
  background: transparent;
  border: 1px solid var(--pico-primary);
  border-radius: 0.375rem;
  cursor: pointer;
  
}

.btn-change-contact:hover {
  background: var(--pico-primary);
  color: #fff;
}

[data-theme="light"] .selected-contact-card {
  background: var(--pubhub-bg-warm);
  border-color: var(--pubhub-accent-warm);
}

/* 404 Error Page */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-size: 6rem;
  font-weight: 700;
  line-height: 1;
  margin: 0 0 1rem;
  color: var(--pico-muted-color);
}

.error-title {
  font-size: 1.75rem;
  margin: 1rem 0 0.5rem;
  color: var(--pico-color);
}

.error-message {
  font-size: 1.1rem;
  color: var(--pico-muted-color);
  margin-bottom: 2rem;
  max-width: 400px;
}

.error-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.error-actions .btn-primary {
  padding: 0.75rem 1.5rem;
  background: var(--pico-primary);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  
}

.error-actions .btn-primary:hover {
  background: var(--pico-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(31, 111, 235, 0.3);
}

.error-actions .btn-secondary {
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--pico-muted-color);
  border: 2px solid var(--pico-muted-border-color);
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  
}

.error-actions .btn-secondary:hover {
  border-color: var(--pico-primary);
  color: var(--pico-primary);
}

.error-hint {
  margin-top: 1rem;
}

.error-hint code {
  font-size: 0.85rem;
  padding: 0.25rem 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0.25rem;
  color: var(--pico-muted-color);
}

[data-theme="light"] .error-hint code {
  background: rgba(0, 0, 0, 0.05);
}

/* ===== Access Graph ===== */

#page-access-graph {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
}

/* Toolbar — glass panel */
.graph-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1.25rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  z-index: 5;
}

[data-theme="light"] .graph-toolbar {
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.graph-toolbar .btn-small {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  margin: 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 0.3rem;
  transition: all 0.2s;
}

.graph-toolbar .btn-small:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

[data-theme="light"] .graph-toolbar .btn-small:hover {
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
}

/* Env toggle */
.graph-env-toggle {
  display: flex;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 0.3rem;
  overflow: hidden;
}

.graph-env-btn {
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: transparent;
  border: none;
  color: var(--pico-muted-color);
  cursor: pointer;
  transition: all 0.15s;
}

.graph-env-btn:first-child {
  border-right: 1px solid rgba(99, 102, 241, 0.12);
}

.graph-env-btn:hover {
  color: #c4cbda;
}

.graph-env-btn.active[data-env="production"] {
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
}

.graph-env-btn.active[data-env="development"] {
  background: rgba(251, 191, 36, 0.12);
  color: #fcd34d;
}

[data-theme="light"] .graph-env-btn.active[data-env="production"] {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

[data-theme="light"] .graph-env-btn.active[data-env="development"] {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
}

/* Close button */
.graph-close-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.35rem;
  color: var(--pico-muted-color);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  margin-left: 0.25rem;
  transition: all 0.15s;
}

.graph-close-btn:hover {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.25);
  color: #fca5a5;
}

[data-theme="light"] .graph-close-btn:hover {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}

/* Filter toggles with colored dots */
.graph-filter-toggles {
  display: flex;
  gap: 0.9rem;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.graph-filter-toggles label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.graph-filter-toggles label:hover { opacity: 0.8; }

.graph-filter-toggles input[type="checkbox"] {
  display: none;
}

.toggle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px currentColor;
}

.toggle-dot.toggle-user { background: #818cf8; color: #818cf8; }
.toggle-dot.toggle-service { background: #34d399; color: #34d399; }
.toggle-dot.toggle-client { background: #fbbf24; color: #fbbf24; }

/* Unchecked state */
.graph-filter-toggles input[type="checkbox"]:not(:checked) + .toggle-dot {
  opacity: 0.25;
  box-shadow: none;
}

.graph-refresh-indicator {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  margin-left: auto;
  white-space: nowrap;
  opacity: 0.6;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Graph body — dot grid background */
.graph-body {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

#graph-container {
  width: 100%;
  height: 100%;
  border-radius: 0 0 0.5rem 0.5rem;
  background-color: #0f0f1a;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(99, 102, 241, 0.08) 1px, transparent 0);
  background-size: 32px 32px;
}

[data-theme="light"] #graph-container {
  background-color: #f8f9fc;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(99, 102, 241, 0.1) 1px, transparent 0);
  background-size: 32px 32px;
}

/* Floating legend */
.graph-legend {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  background: rgba(15, 15, 26, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 0.5rem;
  z-index: 5;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pico-muted-color);
}

[data-theme="light"] .graph-legend {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.legend-section {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.legend-line {
  width: 20px;
  height: 2px;
  border-radius: 1px;
  display: inline-block;
}

.legend-line.legend-read { background: #64748b; box-shadow: 0 0 4px rgba(100, 116, 139, 0.4); }
.legend-line.legend-write { background: #facc15; box-shadow: 0 0 4px rgba(250, 204, 21, 0.4); }
.legend-line.legend-admin { background: #f87171; box-shadow: 0 0 4px rgba(248, 113, 113, 0.5); }

/* Search filter */
.graph-filter {
  position: relative;
  min-width: 220px;
}

.graph-filter input {
  margin: 0;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  background: rgba(15, 15, 26, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 0.35rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.graph-filter input:focus {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

[data-theme="light"] .graph-filter input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.12);
}

.graph-filter-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  background: rgba(20, 20, 36, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
  max-height: 250px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .graph-filter-dropdown {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
}

.graph-filter-dropdown.visible { display: block; }

.graph-filter-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  transition: background 0.15s;
}

.graph-filter-item:hover {
  background: rgba(99, 102, 241, 0.1);
}

.graph-filter-item .filter-type-badge {
  font-size: 0.8rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-type-badge.user { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; }
.filter-type-badge.service { background: rgba(52, 211, 153, 0.15); color: #6ee7b7; }
.filter-type-badge.client { background: rgba(251, 191, 36, 0.15); color: #fcd34d; }

[data-theme="light"] .filter-type-badge.user { background: rgba(79, 70, 229, 0.1); color: #4f46e5; }
[data-theme="light"] .filter-type-badge.service { background: rgba(16, 185, 129, 0.1); color: #059669; }
[data-theme="light"] .filter-type-badge.client { background: rgba(217, 119, 6, 0.1); color: #d97706; }

/* Detail panel — glass sidebar */
.graph-detail-panel {
  position: absolute;
  top: 0.5rem;
  right: 0.4rem;
  bottom: 0.5rem;
  width: 360px;
  overflow-y: auto;
  background: rgba(20, 20, 36, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 0.75rem;
  padding: 0.9rem 0.75rem;
  z-index: 10;
  font-size: 0.85em;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .graph-detail-panel {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.graph-detail-panel .detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.detail-header-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.graph-detail-panel .detail-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--pico-muted-color);
  padding: 0.2rem;
  margin: -0.2rem;
  line-height: 1;
  border-radius: 0.25rem;
  transition: background 0.15s;
}

.graph-detail-panel .detail-close:hover {
  background: rgba(255, 255, 255, 0.06);
}

.detail-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--pico-muted-color);
  padding: 0.2rem;
  line-height: 1;
  border-radius: 0.25rem;
  transition: color 0.15s, background 0.15s;
  opacity: 0.6;
}

.detail-delete-btn svg {
  width: 14px;
  height: 14px;
  display: block;
}

.detail-delete-btn:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  opacity: 1;
}

.graph-detail-panel .detail-type-badge {
  font-size: 0.8rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.graph-detail-panel .detail-label {
  font-size: 1.15rem;
  font-weight: 600;
  font-family: var(--pubhub-font-heading);
  margin: 0.4rem 0;
  letter-spacing: -0.01em;
}

.graph-detail-panel .detail-id {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  font-family: 'DM Mono', 'SF Mono', 'Fira Code', monospace;
  word-break: break-all;
  opacity: 0.7;
}

.graph-detail-panel .detail-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin: 0.6rem 0 0.75rem;
}

.graph-detail-panel .detail-badge {
  font-size: 0.8rem;
  padding: 0.15rem 0.45rem;
  border-radius: 0.3rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.graph-detail-panel h4.detail-section-header {
  font-size: 0.8rem;
  margin: 1.1rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-family: var(--pubhub-font-body);
  padding: 0.35rem 0.6rem;
  border-radius: 0.3rem;
}

.detail-section-header .section-arrow {
  font-size: 1.2rem;
  margin-right: 0.3rem;
  vertical-align: middle;
  font-weight: 700;
}

.detail-section-header.outgoing {
  color: #34d399;
  background: rgba(52, 211, 153, 0.08);
  border-left: 3px solid #34d399;
}

.detail-section-header.incoming {
  color: #818cf8;
  background: rgba(129, 140, 248, 0.08);
  border-left: 3px solid #818cf8;
}

[data-theme="light"] .detail-section-header.outgoing {
  color: #059669;
  background: rgba(5, 150, 105, 0.06);
  border-left-color: #059669;
}

[data-theme="light"] .detail-section-header.incoming {
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.06);
  border-left-color: #4f46e5;
}

.graph-detail-panel .detail-edge-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.graph-detail-panel .detail-edge-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(99, 102, 241, 0.06);
  font-size: 0.82rem;
  gap: 0.4rem;
}

.graph-detail-panel .detail-edge-item > span:first-child,
.graph-detail-panel .detail-edge-item > a:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.edge-entity-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
}

.edge-entity-link:hover {
  color: #818cf8;
  text-decoration: underline;
}

[data-theme="light"] .edge-entity-link:hover {
  color: #6366f1;
}

.graph-detail-panel .detail-edge-item:last-child { border-bottom: none; }

.graph-detail-panel .edge-level {
  font-size: 0.8rem;
  padding: 0.12rem 0.4rem;
  border-radius: 0.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.edge-level.read { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }
.edge-level.write { background: rgba(250, 204, 21, 0.15); color: #fcd34d; }
.edge-level.admin { background: rgba(248, 113, 113, 0.15); color: #fca5a5; }

[data-theme="light"] .edge-level.read { background: rgba(100, 116, 139, 0.1); color: #475569; }
[data-theme="light"] .edge-level.write { background: rgba(202, 138, 4, 0.1); color: #a16207; }
[data-theme="light"] .edge-level.admin { background: rgba(220, 38, 38, 0.1); color: #dc2626; }

.edge-level-select {
  font-size: 0.8rem;
  padding: 0.1rem 0.2rem;
  border-radius: 0.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='4' viewBox='0 0 6 4'%3E%3Cpath fill='%239ca3af' d='M3 4L0 0h6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.1rem center;
  padding-right: 0.55rem;
  margin: 0;
  line-height: 1.3;
  width: auto;
  max-width: 5rem;
}

.edge-level-select:focus {
  outline: 1px solid rgba(99, 102, 241, 0.4);
  border-color: rgba(99, 102, 241, 0.3);
}

.edge-level-select.read { background-color: rgba(100, 116, 139, 0.15); color: #94a3b8; }
.edge-level-select.write { background-color: rgba(250, 204, 21, 0.15); color: #fcd34d; }
.edge-level-select.admin { background-color: rgba(248, 113, 113, 0.15); color: #fca5a5; }

[data-theme="light"] .edge-level-select.read { background-color: rgba(100, 116, 139, 0.1); color: #475569; }
[data-theme="light"] .edge-level-select.write { background-color: rgba(202, 138, 4, 0.1); color: #a16207; }
[data-theme="light"] .edge-level-select.admin { background-color: rgba(220, 38, 38, 0.1); color: #dc2626; }

.edge-controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.edge-revoke-btn {
  background: none;
  border: none;
  padding: 0.15rem;
  cursor: pointer;
  color: var(--pico-muted-color);
  opacity: 0.4;
  transition: opacity 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  margin: 0;
  line-height: 1;
}

.edge-revoke-btn svg {
  width: 13px;
  height: 13px;
}

.edge-revoke-btn:hover {
  opacity: 1;
  color: #ef4444;
}

.detail-lastseen {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  opacity: 0.7;
  margin-bottom: 0.25rem;
}

/* Detail panel actions */
.detail-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(99, 102, 241, 0.08);
}

.detail-action-btn {
  flex: 1;
  padding: 0.45rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 0.35rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
  background: rgba(99, 102, 241, 0.06);
  color: #a5b4fc;
  cursor: pointer;
  transition: all 0.15s;
}

.detail-action-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
}

.detail-action-btn.detail-action-danger {
  border-color: rgba(248, 113, 113, 0.2);
  background: rgba(248, 113, 113, 0.06);
  color: #fca5a5;
}

.detail-action-btn.detail-action-danger:hover {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.35);
}

[data-theme="light"] .detail-action-btn {
  background: rgba(79, 70, 229, 0.05);
  border-color: rgba(79, 70, 229, 0.15);
  color: #4f46e5;
}

[data-theme="light"] .detail-action-btn.detail-action-danger {
  background: rgba(220, 38, 38, 0.05);
  border-color: rgba(220, 38, 38, 0.15);
  color: #dc2626;
}

/* Graph responsive */
@media (max-width: 768px) {
  .graph-filter { min-width: 160px; }
  .graph-toolbar { gap: 0.5rem; padding: 0.5rem 0.75rem; }
  .graph-detail-panel { width: 300px; top: 0.5rem; right: 0.4rem; bottom: 0.5rem; }
  .graph-refresh-indicator { display: none; }
  .graph-legend { display: none; }
}

@media (max-width: 480px) {
  .graph-detail-panel {
    width: calc(100% - 1rem);
    max-height: 45%;
    top: auto;
    bottom: 0.5rem;
    right: 0.5rem;
    left: 0.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(99, 102, 241, 0.12);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
  }
}

/* Wide modal variant (used for timezone picker) */
.modal-container.modal-container--wide {
  max-width: 700px;
}

.modal-container--wide .modal-body {
  max-height: 70vh;
}

/* Timezone picker */
.tz-picker-map {
  width: 100%;
  border-radius: 6px;
  cursor: crosshair;
}

.tz-picker-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.tz-picker-search-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.tz-picker-search {
  width: 100%;
  margin-bottom: 0 !important;
}

.tz-picker-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 4px;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tz-picker-dropdown .tz-group-header {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pico-muted-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tz-picker-dropdown .tz-option {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tz-picker-dropdown .tz-option:hover {
  background: var(--pico-muted-border-color);
}

.tz-picker-clock {
  font-size: 0.9rem;
  color: var(--pico-muted-color);
  min-width: 180px;
}

/* User form pages (create/edit) */
.user-form-container {
  max-width: 960px;
  margin: 0 auto;
}

.user-form-container h2 {
  margin-bottom: 1.5rem;
}

.user-form-container .form-section {
  margin-bottom: 2rem;
}

.user-form-container .form-section h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
}

.user-form-container .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}

.user-form-container .form-grid .form-field {
  display: flex;
  flex-direction: column;
}

.user-form-container .form-grid .form-field.full-width {
  grid-column: 1 / -1;
}

.user-form-container .form-grid label {
  font-weight: 500;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}

.user-form-container .form-grid input,
.user-form-container .form-grid select {
  margin-bottom: 0;
}

.user-form-container .form-hint {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  margin-top: 0.25rem;
}

.user-form-container .form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--pico-muted-border-color);
}

.user-form-container .form-actions button {
  min-width: 140px;
}

.user-form-container .contact-section-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pico-muted-color);
  margin-bottom: 0.5rem;
}

.user-form-container .contact-source {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  margin-top: 0.25rem;
}

.user-form-container .tz-picker-map {
  width: 100%;
  border-radius: 6px;
  cursor: crosshair;
}

.user-form-container .checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.user-form-container .checkbox-row input[type="checkbox"] {
  margin: 0;
  width: auto;
}

.user-form-container .checkbox-row label {
  margin-bottom: 0;
  cursor: pointer;
}

/* ===== Activity Page ===== */
.activity-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(139,148,255,0.15);
}

.act-toolbar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.activity-controls-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.act-control-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
}

.activity-mode-toggle {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(129,140,248,0.25);
  background: rgba(129,140,248,0.06);
}

.activity-mode-btn {
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  background: transparent;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  transition: all 0.15s;
}

.activity-mode-btn:hover { color: rgba(255,255,255,0.8); }

.activity-mode-btn.active {
  background: var(--pubhub-accent);
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.activity-date-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.activity-date-group input[type="date"],
.activity-date-group select,
#activity-service-filter,
#activity-user-select {
  padding: 0.45rem 0.7rem;
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
  border-radius: 8px;
  border: 1px solid rgba(129,140,248,0.25);
  background: rgba(129,140,248,0.06);
  color: var(--pico-color);
  height: auto;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  --pico-form-element-spacing-vertical: 0.45rem;
  --pico-form-element-spacing-horizontal: 0.7rem;
}

.activity-date-group input[type="date"]:hover,
.activity-date-group input[type="date"]:focus,
.activity-date-group select:hover,
.activity-date-group select:focus,
#activity-service-filter:hover,
#activity-service-filter:focus,
#activity-user-select:hover,
#activity-user-select:focus {
  border-color: rgba(129,140,248,0.45);
  background: rgba(129,140,248,0.1);
  outline: none;
}

#activity-service-filter { min-width: 140px; }
#activity-user-select { min-width: 160px; }

.act-nav-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(129,140,248,0.25);
  border-radius: 8px;
  background: rgba(129,140,248,0.06);
  color: var(--pico-color);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}

.act-nav-btn:hover { background: rgba(129,140,248,0.15); border-color: rgba(129,140,248,0.3); }

.act-btn-today {
  padding: 0.4rem 0.75rem;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(129,140,248,0.25);
  border-radius: 6px;
  background: rgba(129,140,248,0.08);
  color: var(--pico-color);
  cursor: pointer;
  transition: all 0.12s;
}

.act-btn-today:hover { background: rgba(129,140,248,0.18); border-color: rgba(129,140,248,0.4); }

.act-range-sep {
  font-size: 0.95rem;
  opacity: 0.4;
  padding: 0 0.15rem;
}

/* Legend */
.activity-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
  margin-left: 0.7rem;
}

.legend-sso  { background: #fb923c; box-shadow: 0 0 8px rgba(251,146,60,0.5); }
.legend-mcp  { background: #8b94ff; box-shadow: 0 0 8px rgba(139,148,255,0.5); }
.legend-both { background: #38e0bb; box-shadow: 0 0 8px rgba(56,224,187,0.5); }

/* Activity cards */
.activity-card {
  border: 2px solid rgba(56,224,187,0.25);
  border-radius: 12px;
  padding: 1rem 1.2rem 0.75rem;
  margin-bottom: 2.5rem;
  background: rgba(139,148,255,0.035);
  transition: all 0.2s;
  overflow: hidden;
  position: relative;
}
.activity-card + .activity-card::before {
  content: '';
  position: absolute;
  top: -1.4rem;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56,224,187,0.25) 20%, rgba(56,224,187,0.35) 50%, rgba(56,224,187,0.25) 80%, transparent);
}

.activity-card:hover {
  border-color: rgba(56,224,187,0.45);
  box-shadow: 0 0 16px rgba(56,224,187,0.08), 0 0 4px rgba(56,224,187,0.12);
}

.activity-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.activity-card-title {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  min-width: 0;
}

.act-delete-btn {
  background: none;
  border: none;
  color: rgba(255,100,100,0.5);
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  transition: color 0.15s;
}
.act-delete-btn:hover { color: #f87171; }

.act-pie-slice { cursor: pointer; transition: opacity 0.15s; }
.act-pie-row { cursor: pointer; transition: opacity 0.15s; }
.act-stream-path { transition: opacity 0.2s; }

.activity-card-header strong {
  font-family: var(--pubhub-font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.activity-meta {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  font-variant-numeric: tabular-nums;
}

.activity-card-stats {
  display: flex;
  gap: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.act-card-stat {
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
}

.act-card-stat small {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.55;
}

.act-card-sso  { color: #fb923c; }
.act-card-mcp  { color: #8b94ff; }
.act-card-get  { color: #60a5fa; }
.act-card-post { color: #4ade80; }
.act-card-put  { color: #c084fc; }
.act-card-del  { color: #fb7185; }

/* Stream chart — full width */
.act-stream-area {
  position: relative;
  margin-bottom: 0.5rem;
}

.act-stream-area svg {
  width: 100%;
  height: 170px;
  display: block;
  border-radius: 8px;
  background: rgba(255,255,255,0.015);
}

.act-stream-path {
  opacity: 0;
  animation: streamFadeIn 0.6s ease forwards;
}

@keyframes streamFadeIn {
  to { opacity: 1; }
}

.act-method-section {
  margin-top: 0.75rem;
}
.act-method-label {
  font-size: 1.06rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.act-method-leg {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}
.act-method-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.act-pie-methods {
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.act-method-svc-divider {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 6px 0 4px;
}
/* Method pie legend needs wider columns for method counts */
.act-method-section .act-pie-legend {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.tt-pie-hover {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.tt-pie-val {
  font-weight: 700;
  font-size: 0.95rem;
  margin-left: auto;
}
.act-method-hover-col {
  cursor: crosshair;
}

.act-hover-line {
  stroke: rgba(255,255,255,0.4);
  stroke-width: 1;
  stroke-dasharray: 4 3;
  display: none;
  pointer-events: none;
}

.act-hover-col {
  cursor: crosshair;
}

.act-hover-col:hover ~ .act-hover-line {
  display: block;
}

/* X-axis hourly labels */
.act-xa {
  position: relative;
  height: 18px;
  margin-top: 2px;
}

.act-xa-tick {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Bottom row: pie + legend + time stats */
.act-bottom-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.act-pie-svg {
  display: block;
  flex-shrink: 0;
}

.act-pie-legend {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 3px 1.25rem;
  padding-top: 0.2rem;
}

.act-pie-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
}

.act-pie-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.act-pie-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.act-pie-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,0.5);
  min-width: 32px;
  text-align: right;
}

/* Time stats — right column in bottom row */
.act-time-stats {
  width: 180px;
  min-width: 180px;
  flex-shrink: 0;
  border-left: 1px solid rgba(255,255,255,0.06);
  padding-left: 1rem;
  padding-top: 0.2rem;
}

.act-ts-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  line-height: 1.7;
}

.act-ts-label {
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.act-ts-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.act-ts-active { color: #34d399; }
.act-ts-idle { color: rgba(255,255,255,0.45); }
.act-ts-time { color: rgba(255,255,255,0.55); }

/* Tooltip service breakdown — tabular layout */
.tt-svc-table {
  display: grid;
  grid-template-columns: 10px auto repeat(var(--tt-cols, 2), minmax(36px, auto));
  gap: 1px 8px;
  align-items: center;
  margin: 4px 0;
}
.tt-svc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tt-svc-name {
  color: rgba(255,255,255,0.65);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.tt-svc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
}
.tt-svc-counts {
  margin-left: auto;
  font-weight: 600;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
}
.tt-val {
  font-size: 0.82rem;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}
.tt-hdr {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.5;
  padding-bottom: 1px;
}
.tt-total {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 3px;
  padding-top: 3px;
  text-align: right;
}

@media (max-width: 640px) {
  .act-bottom-row { flex-wrap: wrap; gap: 0.75rem; }
  .act-pie-legend { grid-template-columns: 1fr; gap: 4px; }
  .act-time-stats { width: 100%; min-width: 0; border-left: none; border-top: 1px solid rgba(255,255,255,0.06); padding-left: 0; padding-top: 0.5rem; }
  .activity-summary { flex-wrap: wrap; gap: 0; }
  .act-stat { padding: 0.5rem 1rem; }
  .act-stat-val { font-size: 1.5rem; }
  .activity-card { padding: 0.75rem 0.6rem 0.5rem; }
}

/* Range quick-select buttons */
.act-range-quick {
  padding: 0.35rem 0.7rem;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid rgba(129,140,248,0.2);
  border-radius: 20px;
  background: rgba(129,140,248,0.06);
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: all 0.15s;
}

.act-range-quick:hover {
  background: rgba(129,140,248,0.15);
  color: rgba(255,255,255,0.85);
  border-color: rgba(129,140,248,0.35);
}

.act-range-quick.active {
  background: var(--pubhub-accent);
  color: #fff;
  border-color: var(--pubhub-accent);
}

/* Bar chart for range view */
.act-bar-chart {
  position: relative;
  margin-bottom: 0.5rem;
}

.act-bar-chart svg {
  width: 100%;
  height: 100px;
  display: block;
  border-radius: 8px;
  background: rgba(255,255,255,0.015);
}

.act-bar-hover {
  cursor: crosshair;
}

[data-theme="light"] .act-range-quick {
  border-color: rgba(99,102,241,0.2);
  background: rgba(99,102,241,0.04);
  color: rgba(0,0,0,0.45);
}
[data-theme="light"] .act-range-quick:hover {
  background: rgba(99,102,241,0.1);
  color: rgba(0,0,0,0.7);
}
[data-theme="light"] .act-bar-chart svg {
  background: rgba(0,0,0,0.02);
}
[data-theme="light"] .act-bar-chart .act-bar-empty { fill: rgba(0,0,0,0.1); }

/* Tooltip */
.act-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  display: none;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: rgba(10, 10, 20, 0.96);
  border: 1px solid rgba(129,140,248,0.25);
  backdrop-filter: blur(12px);
  font-size: 0.85rem;
  line-height: 1.5;
  color: #e8e8f0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 12px rgba(129,140,248,0.1);
  min-width: 200px;
  max-width: 360px;
  font-variant-numeric: tabular-nums;
}

.act-tooltip .tt-time {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 3px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}
.act-tooltip .tt-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.act-tooltip .tt-sso  { color: #fb923c; font-weight: 600; }
.act-tooltip .tt-mcp  { color: #a5b4fc; font-weight: 600; }
.act-tooltip .tt-get  { color: #93c5fd; font-weight: 600; }
.act-tooltip .tt-post { color: #86efac; font-weight: 600; }
.act-tooltip .tt-put  { color: #c4b5fd; font-weight: 600; }
.act-tooltip .tt-del  { color: #fda4af; font-weight: 600; }

/* Summary bar */
.activity-summary {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
  padding: 0;
}

.act-stat {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1.5rem;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.act-stat:first-child { padding-left: 0; }
.act-stat:last-child { border-right: none; }

.act-stat-val {
  font-family: var(--pubhub-font-heading);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.act-stat-val-accent { color: var(--pubhub-accent); }
.act-stat-val-sso  { color: #fb923c; }
.act-stat-val-mcp  { color: #8b94ff; }
.act-stat-val-get  { color: #60a5fa; }
.act-stat-val-post { color: #4ade80; }
.act-stat-val-put  { color: #c084fc; }
.act-stat-val-del  { color: #fb7185; }
.act-stat-sub { font-size: 0.7em; font-weight: 400; opacity: 0.55; }

.act-stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-top: 4px;
}

/* User comparison chips */
.act-user-comparison {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: auto;
  padding-left: 1rem;
  border-left: 1px solid rgba(255,255,255,0.08);
}
.act-user-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 0.375rem;
  font-size: 0.82rem;
  color: #e2e8f0;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.act-user-chip-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 0.375rem;
  z-index: 0;
}
.act-user-chip-text {
  position: relative;
  z-index: 1;
  white-space: nowrap;
}
.act-user-chip-text b {
  color: #818cf8;
  margin-left: 0.35rem;
  font-weight: 700;
}

/* Distribution mini-bar */
.act-dist-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: rgba(255,255,255,0.06);
}

.act-dist-seg {
  height: 100%;
  transition: width 0.3s ease;
}

.act-dist-sso  { background: #fb923c; box-shadow: inset 0 0 8px rgba(251,146,60,0.4); }
.act-dist-mcp  { background: #8b94ff; box-shadow: inset 0 0 8px rgba(139,148,255,0.4); }
.act-dist-get  { background: #60a5fa; box-shadow: inset 0 0 8px rgba(96,165,250,0.4); }
.act-dist-post { background: #4ade80; box-shadow: inset 0 0 8px rgba(74,222,128,0.4); }
.act-dist-put  { background: #c084fc; box-shadow: inset 0 0 8px rgba(192,132,252,0.4); }
.act-dist-del  { background: #fb7185; box-shadow: inset 0 0 8px rgba(251,113,133,0.4); }

.act-dist-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  margin-top: 0.3rem;
  margin-bottom: 1rem;
  font-variant-numeric: tabular-nums;
}

.act-tz-badge {
  display: inline-flex;
  align-items: center;
  font-size: 1em;
  font-weight: 600;
  padding: 0.15em 0.5em;
  margin-left: 0.5em;
  border-radius: 4px;
  background: rgba(129,140,248,0.15);
  color: rgba(129,140,248,0.85);
  vertical-align: middle;
  letter-spacing: 0.03em;
  line-height: 1;
  transform: translateY(-0.04em);
}
.act-tz-note {
  font-size: 0.8em;
  opacity: 0.55;
  font-weight: 400;
}
.act-tz-cet {
  font-size: 0.8em;
  opacity: 0.5;
  margin-left: 0.3em;
}

.activity-empty {
  text-align: center;
  color: rgba(255,255,255,0.5);
  padding: 4rem 1rem;
  font-size: 1rem;
}

/* Light theme overrides */
[data-theme="light"] .activity-toolbar {
  border-bottom-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .act-control-label { color: rgba(0,0,0,0.5); }

[data-theme="light"] .activity-mode-toggle {
  border-color: rgba(99,102,241,0.2);
  background: rgba(99,102,241,0.04);
}

[data-theme="light"] .activity-mode-btn {
  color: rgba(0,0,0,0.5);
}

[data-theme="light"] .activity-mode-btn:hover { color: rgba(0,0,0,0.7); }

[data-theme="light"] .act-nav-btn,
[data-theme="light"] .act-btn-today,
[data-theme="light"] .activity-date-group input,
[data-theme="light"] .activity-date-group select,
[data-theme="light"] #activity-service-filter,
[data-theme="light"] #activity-user-select {
  border-color: rgba(99,102,241,0.2);
  background: rgba(99,102,241,0.04);
}

[data-theme="light"] .activity-card {
  border-color: rgba(16,185,129,0.22);
  background: rgba(99,102,241,0.02);
}
[data-theme="light"] .activity-card + .activity-card::before {
  background: linear-gradient(90deg, transparent, rgba(16,185,129,0.18) 20%, rgba(16,185,129,0.25) 50%, rgba(16,185,129,0.18) 80%, transparent);
}

[data-theme="light"] .activity-card:hover {
  border-color: rgba(16,185,129,0.4);
}

[data-theme="light"] .activity-card-header strong { color: #1e1b4b; }
[data-theme="light"] .act-card-stat { color: rgba(0,0,0,0.6); }
[data-theme="light"] .act-card-sso  { color: #c2410c; }
[data-theme="light"] .act-card-mcp  { color: #4338ca; }
[data-theme="light"] .act-card-get  { color: #2563eb; }
[data-theme="light"] .act-card-post { color: #16a34a; }
[data-theme="light"] .act-card-put  { color: #7c3aed; }
[data-theme="light"] .act-card-del  { color: #e11d48; }
[data-theme="light"] .act-stat-val { color: #1e1b4b; }
[data-theme="light"] .activity-legend { color: rgba(0,0,0,0.6); }
[data-theme="light"] .act-stream-area svg { background: rgba(0,0,0,0.02); }
[data-theme="light"] .act-method-label { color: rgba(0,0,0,0.5); }
[data-theme="light"] .act-pie-methods { color: rgba(0,0,0,0.35); }
[data-theme="light"] .act-hover-line { stroke: rgba(0,0,0,0.3); }
[data-theme="light"] .act-xa-tick { color: rgba(0,0,0,0.5); }
[data-theme="light"] .act-pie-row { color: rgba(0,0,0,0.6); }
[data-theme="light"] .act-pie-val { color: rgba(0,0,0,0.5); }
[data-theme="light"] .act-time-stats { border-top-color: rgba(0,0,0,0.06); }
[data-theme="light"] .act-ts-label { color: rgba(0,0,0,0.55); }
[data-theme="light"] .act-ts-active { color: #059669; }
[data-theme="light"] .act-ts-idle { color: rgba(0,0,0,0.45); }
[data-theme="light"] .act-ts-time { color: rgba(0,0,0,0.5); }
[data-theme="light"] .tt-svc-name { color: rgba(0,0,0,0.6); }
[data-theme="light"] .tt-total { color: rgba(0,0,0,0.5); border-top-color: rgba(0,0,0,0.08); }

[data-theme="light"] .act-tooltip {
  background: rgba(255,255,255,0.97);
  border-color: rgba(99,102,241,0.2);
  color: #333;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

[data-theme="light"] .act-tooltip .tt-time { color: #111; }
[data-theme="light"] .act-tooltip .tt-sso  { color: #b45309; }
[data-theme="light"] .act-tooltip .tt-mcp  { color: #4338ca; }
[data-theme="light"] .act-tooltip .tt-get  { color: #2563eb; }
[data-theme="light"] .act-tooltip .tt-post { color: #16a34a; }
[data-theme="light"] .act-tooltip .tt-put  { color: #7c3aed; }
[data-theme="light"] .act-tooltip .tt-del  { color: #e11d48; }

/* ===== Account Deactivated Page ===== */

#deactivated-view {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(239, 68, 68, 0.06), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(251, 146, 60, 0.04), transparent);
}
[data-theme="light"] #deactivated-view {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(239, 68, 68, 0.04), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(251, 146, 60, 0.03), transparent);
}

.deactivated-card {
  max-width: 480px;
  width: 100%;
  padding: 3rem 2.5rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  backdrop-filter: blur(12px);
}

.deactivated-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  color: #ef4444;
  opacity: 0.8;
}

.deactivated-card h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.deactivated-message {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.deactivated-date {
  color: #64748b;
  font-size: 0.8rem;
  font-style: italic;
  margin-bottom: 2rem;
}

.deactivated-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.5rem;
}

.deactivated-footer p {
  color: #64748b;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.deactivated-logout-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.deactivated-logout-btn:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: #e2e8f0;
}

[data-theme="light"] .deactivated-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .deactivated-card h1 { color: #0f172a; }
[data-theme="light"] .deactivated-message { color: #475569; }
[data-theme="light"] .deactivated-date { color: #94a3b8; }
[data-theme="light"] .deactivated-footer { border-top-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .deactivated-footer p { color: #94a3b8; }
[data-theme="light"] .deactivated-logout-btn { border-color: rgba(0, 0, 0, 0.12); color: #64748b; }
[data-theme="light"] .deactivated-logout-btn:hover { border-color: rgba(0, 0, 0, 0.25); color: #1e293b; }

/* ===== Contractor Terms Agreement Gate ===== */

#offboard-view {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(139, 92, 246, 0.04), transparent);
}
[data-theme="light"] #offboard-view {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.06), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(139, 92, 246, 0.03), transparent);
}

.offboard-card {
  background: linear-gradient(180deg, #141c2e 0%, #111827 100%);
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 720px;
  border: 1px solid rgba(59, 130, 246, 0.15);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(59, 130, 246, 0.04);
  position: relative;
  overflow: hidden;
}
.offboard-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6);
  background-size: 200% 100%;
}

.offboard-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 4px;
  color: #60a5fa;
  margin-bottom: 0.75rem;
  padding: 0.3rem 1rem;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 100px;
  background: rgba(59, 130, 246, 0.08);
}

.offboard-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.offboard-header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.03em;
}

.offboard-subtitle {
  color: #e2e8f0;
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.offboard-address {
  color: #94a3b8;
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
}

.offboard-signed-by {
  color: #cbd5e1;
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.offboard-message {
  background: rgba(99, 102, 241, 0.06);
  border-left: 2px solid rgba(99, 102, 241, 0.4);
  padding: 0.875rem 1.125rem;
  margin-bottom: 1rem;
  border-radius: 0 0.375rem 0.375rem 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.offboard-contact {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}
.offboard-contact strong { color: #cbd5e1; }

.offboard-representative {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 1.25rem;
  padding: 0.875rem 1rem;
  background: rgba(59, 130, 246, 0.04);
  border: 1px solid rgba(59, 130, 246, 0.1);
  border-radius: 0.5rem;
  line-height: 1.7;
}
.offboard-representative strong {
  color: #60a5fa;
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 800;
}

.offboard-preamble {
  font-size: 0.85rem;
  line-height: 1.7;
  color: #cbd5e1;
  margin-bottom: 1.75rem;
  padding: 0 0.25rem;
}

.offboard-questions {
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.offboard-q {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.625rem;
  padding: 1rem 1.125rem;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.offboard-q:hover {
  border-color: rgba(96, 165, 250, 0.2);
  background: rgba(59, 130, 246, 0.03);
}

.offboard-q.answered-yes {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.06);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.08);
}

.offboard-q.answered-no {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.06);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.08);
}

.offboard-q-text {
  font-size: 0.84rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
  color: #e2e8f0;
}

.offboard-q-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(139,92,246,0.15));
  color: #93c5fd;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 800;
  margin-right: 0.625rem;
  vertical-align: middle;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

.offboard-q-btns {
  display: flex;
  gap: 0.5rem;
}

.offboard-q-btns button {
  flex: 1;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.375rem;
  background: transparent;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s;
}

.offboard-q-btns button:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #f1f5f9;
  background: rgba(255,255,255,0.04);
}

.offboard-q-btns button.selected-yes {
  background: #16a34a;
  border-color: #22c55e;
  color: #fff;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.25);
}

.offboard-q-btns button.selected-no {
  background: #dc2626;
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.25);
}

.offboard-actions {
  margin-top: 1.75rem;
}

.offboard-submit-btn {
  width: 100%;
  padding: 0.95rem;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
}

.offboard-submit-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  box-shadow: none;
}

.offboard-submit-btn:not(:disabled):hover {
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.offboard-legal {
  text-align: center;
  font-size: 0.8rem;
  color: #8a9aa8;
  margin-top: 1.25rem;
  margin-bottom: 0;
  line-height: 1.5;
}

/* Light theme overrides */
[data-theme="light"] .offboard-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(59, 130, 246, 0.15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .offboard-header { border-bottom-color: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .offboard-header h1 { color: #0f172a; }
[data-theme="light"] .offboard-badge { color: #2563eb; border-color: rgba(37, 99, 235, 0.25); background: rgba(59, 130, 246, 0.06); }
[data-theme="light"] .offboard-subtitle { color: #1e293b; }
[data-theme="light"] .offboard-signed-by { color: #0f172a; }
[data-theme="light"] .offboard-message { background: rgba(99, 102, 241, 0.04); color: #334155; }
[data-theme="light"] .offboard-contact strong { color: #334155; }
[data-theme="light"] .offboard-representative { background: rgba(59, 130, 246, 0.03); border-color: rgba(59, 130, 246, 0.12); color: #475569; }
[data-theme="light"] .offboard-representative strong { color: #2563eb; }
[data-theme="light"] .offboard-preamble { color: #475569; }
[data-theme="light"] .offboard-q { background: rgba(0,0,0,0.015); border-color: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .offboard-q:hover { border-color: rgba(59, 130, 246, 0.25); background: rgba(59, 130, 246, 0.02); }
[data-theme="light"] .offboard-q-text { color: #1e293b; }
[data-theme="light"] .offboard-q-number { background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1)); color: #2563eb; border-color: rgba(59,130,246,0.2); }
[data-theme="light"] .offboard-q-btns button { border-color: rgba(0, 0, 0, 0.12); color: #8a9aa8; }
[data-theme="light"] .offboard-q-btns button:hover { border-color: rgba(0, 0, 0, 0.25); color: #1e293b; background: rgba(0,0,0,0.02); }
[data-theme="light"] .offboard-submit-btn { background: linear-gradient(135deg, #2563eb, #4f46e5); }
[data-theme="light"] .offboard-submit-btn:not(:disabled):hover { box-shadow: 0 4px 24px rgba(37, 99, 235, 0.35); }

.offboard-preview-close {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: #94a3b8;
}
.offboard-preview-close:hover { color: #e2e8f0; }

.admin-tools-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.admin-tool-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--pico-primary);
  font-size: 0.9rem;
}

.status-pill.status-ok {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.status-pill.status-warn {
  background: rgba(234, 179, 8, 0.15);
  color: #ca8a04;
}
.status-pill.status-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.offboard-consent-meta {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
}
.consent-meta-header {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  color: #8a9aa8;
}
.consent-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.consent-meta-row span:first-child {
  color: #8a9aa8;
  font-weight: 500;
  min-width: 5rem;
}
.consent-meta-row span:last-child {
  text-align: right;
  word-break: break-all;
  color: #cbd5e1;
}
.consent-meta-ua {
  font-size: 0.8rem;
  max-width: 20rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .offboard-consent-meta {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.015);
}
[data-theme="light"] .consent-meta-row {
  border-bottom-color: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .consent-meta-row span:last-child { color: #1e293b; }

/* Confirmation summary */
.offboard-summary h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}

.offboard-summary-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.375rem;
  margin-bottom: 0.375rem;
  font-size: 0.82rem;
  background: rgba(255,255,255,0.02);
}

.offboard-summary-row.summary-yes {
  border-left: 2px solid #16a34a;
}

.offboard-summary-row.summary-no {
  border-left: 2px solid #dc2626;
}

.offboard-summary-num {
  flex-shrink: 0;
  width: 1.375rem;
  height: 1.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(139,92,246,0.15));
  font-size: 0.8rem;
  font-weight: 800;
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

.offboard-summary-q {
  flex: 1;
  color: #94a3b8;
}

.offboard-summary-a {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.summary-yes .offboard-summary-a { color: #22c55e; }
.summary-no .offboard-summary-a { color: #ef4444; }

.offboard-summary-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.offboard-back-btn {
  flex: 1;
  padding: 0.75rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.375rem;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s;
}
.offboard-back-btn:hover { border-color: rgba(255, 255, 255, 0.2); color: #e2e8f0; }

.offboard-confirm-btn {
  flex: 2;
  padding: 0.75rem;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border: none;
  border-radius: 0.5rem;
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
}
.offboard-confirm-btn:hover { box-shadow: 0 4px 24px rgba(59, 130, 246, 0.4); transform: translateY(-1px); }

.offboard-confirm-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

[data-theme="light"] .offboard-summary h3 { color: #0f172a; }
[data-theme="light"] .offboard-summary-row { background: rgba(0,0,0,0.015); }
[data-theme="light"] .offboard-summary-num { background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1)); color: #2563eb; border-color: rgba(59,130,246,0.2); }
[data-theme="light"] .offboard-back-btn { border-color: rgba(0, 0, 0, 0.12); color: #8a9aa8; }
[data-theme="light"] .offboard-confirm-btn { background: linear-gradient(135deg, #2563eb, #4f46e5); }
[data-theme="light"] .offboard-confirm-btn:hover { box-shadow: 0 4px 24px rgba(37, 99, 235, 0.35); }

/* ===== Offboard Admin Stepper Page ===== */
.ob-page { max-width: 1100px; margin: 0 auto; }
.ob-page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.ob-page-header .avatar-large {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.ob-page-header-info h2 { margin: 0; font-size: 1.3rem; }
.ob-page-header-info p { margin: 0; color: #94a3b8; font-size: 0.85rem; }
.ob-not-active {
  text-align: center; padding: 3rem 1rem; color: #8a9aa8;
}
.ob-not-active h3 { color: #94a3b8; margin-bottom: 0.5rem; }

.ob-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Stepper rail */
.ob-stepper {
  position: relative;
  padding: 0;
}
.ob-stepper::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.ob-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  cursor: pointer;
  transition: opacity 0.2s;
}
.ob-step:hover { opacity: 1; }
.ob-step.locked { opacity: 0.4; cursor: default; }
.ob-step.active { opacity: 1; }

.ob-step-node {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
  flex-shrink: 0;
  z-index: 1;
  transition: all 0.3s;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: #1e293b;
  color: #475569;
}
.ob-step.complete .ob-step-node {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}
.ob-step.active .ob-step-node {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
  animation: ob-pulse 2s ease-in-out infinite;
}
.ob-step.irreversible.active .ob-step-node {
  background: #dc2626;
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.2);
  animation: ob-pulse-red 2s ease-in-out infinite;
}
@keyframes ob-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.1); }
}
@keyframes ob-pulse-red {
  0%, 100% { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0.1); }
}

.ob-step-text { flex: 1; min-width: 0; }
.ob-step-title {
  font-size: 0.8rem; font-weight: 600; color: #e2e8f0;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.ob-step.locked .ob-step-title { color: #8a9aa8; }
.ob-step-subtitle {
  font-size: 0.8rem; color: #cbd5e1; margin-top: 0.125rem;
}

/* Detail panel */
.ob-detail {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 1.5rem;
  min-height: 300px;
}
.ob-detail-title {
  font-size: 0.82rem; font-weight: 700; color: #cbd5e1;
  text-transform: uppercase; letter-spacing: 1.5px;
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ob-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  font-size: 1rem;
}
.ob-detail-label { color: #cbd5e1; font-weight: 500; }
.ob-detail-value { color: #f1f5f9; text-align: right; word-break: break-all; }
.ob-detail-value code { font-size: 0.88rem; }

.ob-detail-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ob-detail-section h4 {
  font-size: 0.85rem; font-weight: 700; color: #e2e8f0;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin: 0 0 0.75rem;
}

/* Consent responses in detail panel */
.ob-consent-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.375rem;
  border-radius: 0.375rem;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.015);
  border-left: 2px solid transparent;
}
.ob-consent-item.agreed { border-left-color: #16a34a; }
.ob-consent-item.declined { border-left-color: #dc2626; }
.ob-consent-num {
  flex-shrink: 0; width: 1.5rem; height: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255, 255, 255, 0.08);
  font-size: 0.8rem; font-weight: 700; color: #94a3b8;
}
.ob-consent-q { flex: 1; color: #e2e8f0; line-height: 1.5; }
.ob-consent-a {
  flex-shrink: 0; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.5px;
}
.ob-consent-item.agreed .ob-consent-a { color: #22c55e; }
.ob-consent-item.declined .ob-consent-a { color: #ef4444; }

/* Scan report table */
.ob-report-table {
  width: 100%; font-size: 0.82rem;
  border-collapse: collapse;
}
.ob-report-table th {
  text-align: left; font-weight: 600; color: #94a3b8;
  padding: 0.375rem 0.5rem; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ob-report-table td {
  padding: 0.375rem 0.5rem; color: #cbd5e1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.ob-report-table tr:last-child td { border-bottom: none; }

/* Scan summary stat cards */
.ob-scan-summary {
  display: flex; gap: 0.625rem; margin: 0.75rem 0 0.25rem; flex-wrap: wrap;
}
.ob-scan-stat-card {
  flex: 1; min-width: 80px;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.ob-scan-stat-card.ob-stat-cyan { background: rgba(6, 182, 212, 0.08); border-color: rgba(6, 182, 212, 0.18); }
.ob-scan-stat-card.ob-stat-indigo { background: rgba(99, 102, 241, 0.08); border-color: rgba(99, 102, 241, 0.18); }
.ob-scan-stat-card.ob-stat-amber { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.18); }
.ob-scan-stat-num {
  display: block; font-size: 1.3rem; font-weight: 800; line-height: 1;
}
.ob-stat-cyan .ob-scan-stat-num { color: #22d3ee; }
.ob-stat-indigo .ob-scan-stat-num { color: #a5b4fc; }
.ob-stat-amber .ob-scan-stat-num { color: #fbbf24; }
.ob-scan-stat-label {
  display: block; font-size: 0.8rem; font-weight: 600; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 0.5px; margin-top: 0.25rem;
}

/* Colored section accents */
.ob-section-colored { position: relative; }
.ob-section-scans { border-left: 3px solid #06b6d4; padding-left: 1rem; }
.ob-section-repos { border-left: 3px solid #6366f1; padding-left: 1rem; }
.ob-section-checkins { border-left: 3px solid #f59e0b; padding-left: 1rem; }
.ob-section-scans h4 { color: #22d3ee !important; }
.ob-section-repos h4 { color: #a5b4fc !important; }
.ob-section-checkins h4 { color: #fbbf24 !important; }

/* Scan report cards */
.ob-scan-cards { display: flex; flex-direction: column; gap: 0.375rem; }
.ob-scan-card {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0.75rem;
  background: rgba(6, 182, 212, 0.04);
  border: 1px solid rgba(6, 182, 212, 0.1);
  border-radius: 0.375rem;
  transition: all 0.15s;
}
.ob-scan-card:hover { background: rgba(6, 182, 212, 0.08); border-color: rgba(6, 182, 212, 0.2); }
.ob-scan-card-left { min-width: 0; }
.ob-scan-card-host { font-size: 0.8rem; font-weight: 600; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-scan-card-date { font-size: 0.8rem; color: #94a3b8; margin-top: 0.125rem; }
.ob-scan-card-right { display: flex; gap: 0.5rem; align-items: center; flex-shrink: 0; }
.ob-scan-os-badge {
  font-size: 0.8rem; font-weight: 700; padding: 0.125rem 0.5rem;
  border-radius: 1rem; letter-spacing: 0.3px; white-space: nowrap;
}
.ob-scan-os-badge.os-darwin { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.ob-scan-os-badge.os-linux { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.ob-scan-os-badge.os-windows { background: rgba(192, 132, 252, 0.15); color: #c084fc; }
.ob-scan-repo-count {
  font-size: 0.8rem; font-weight: 700; color: #fbbf24;
  background: rgba(251, 191, 36, 0.1); padding: 0.125rem 0.5rem; border-radius: 1rem;
}

/* Repo cards */
.ob-repo-cards { display: flex; flex-direction: column; gap: 0.375rem; }
.ob-repo-card {
  padding: 0.5rem 0.75rem;
  background: rgba(99, 102, 241, 0.04);
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 0.375rem;
  transition: all 0.15s;
}
.ob-repo-card:hover { background: rgba(99, 102, 241, 0.08); }
.ob-repo-card-name code { font-size: 0.82rem; font-weight: 600; color: #a5b4fc; }
.ob-repo-card-path { font-size: 0.8rem; color: #94a3b8; margin-top: 0.125rem; }
.ob-repo-card-origin { font-size: 0.8rem; color: #818cf8; margin-top: 0.125rem; word-break: break-all; opacity: 0.7; }

/* Compliance check-in timeline */
.ob-checkin-badge {
  font-size: 0.8rem; font-weight: 700;
  background: rgba(245, 158, 11, 0.18); color: #fbbf24;
  padding: 0.0625rem 0.375rem; border-radius: 1rem; margin-left: 0.375rem;
}
.ob-checkin-timeline {
  position: relative; padding-left: 1.25rem;
}
.ob-checkin-timeline::before {
  content: ''; position: absolute; left: 4px; top: 10px; bottom: 10px;
  width: 2px; background: rgba(245, 158, 11, 0.2); border-radius: 1px;
}
.ob-checkin-entry {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.375rem 0; position: relative;
}
.ob-checkin-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #f59e0b; flex-shrink: 0; margin-top: 4px;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.35); z-index: 1;
}
.ob-checkin-content { display: flex; flex-direction: column; gap: 0.0625rem; }
.ob-checkin-time { font-size: 0.82rem; font-weight: 600; color: #e2e8f0; font-variant-numeric: tabular-nums; }
.ob-checkin-host { font-size: 0.8rem; color: #cbd5e1; }
.ob-checkin-ip { color: #94a3b8; }
.ob-checkin-overflow { display: none; }
.ob-checkin-overflow.ob-checkin-expanded { display: block; }
.ob-checkin-toggle {
  display: inline-block; margin-top: 0.5rem; margin-left: 1.5rem;
  padding: 0.25rem 0.75rem; font-size: 0.8rem; font-weight: 600;
  color: #f59e0b; background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2); border-radius: 1rem;
  cursor: pointer; transition: all 0.15s;
}
.ob-checkin-toggle:hover { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.35); }

/* Irreversible warning banner */
.ob-warning {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: #fca5a5;
  line-height: 1.5;
}
.ob-warning strong { color: #ef4444; }

/* Action buttons within detail panel */
.ob-actions {
  display: flex; gap: 0.75rem; margin-top: 1.25rem; flex-wrap: wrap; justify-content: center;
}
.ob-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #cbd5e1;
}
.ob-btn:hover { border-color: rgba(255, 255, 255, 0.25); color: #e2e8f0; }
.ob-btn-primary {
  background: #6366f1; border-color: #6366f1; color: #fff;
}
.ob-btn-primary:hover { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.ob-btn-danger {
  background: #dc2626; border-color: #dc2626; color: #fff;
}
.ob-btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.ob-btn-muted {
  color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.1);
  font-weight: 600; letter-spacing: 0.3px;
}
.ob-btn-muted:hover { color: #fcd34d; border-color: rgba(251, 191, 36, 0.6); background: rgba(251, 191, 36, 0.18); }
.ob-btn-sm { padding: 0.25rem 0.75rem; font-size: 0.8rem; }

/* Repo selection list */
.ob-repo-list {
  max-height: 20rem; overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 0.375rem;
  background: rgba(0, 0, 0, 0.15);
}
.ob-repo-item {
  display: flex; align-items: flex-start; gap: 0.5rem;
  padding: 0.5rem 0.75rem; cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s;
}
.ob-repo-item:last-child { border-bottom: none; }
.ob-repo-item:hover { background: rgba(255, 255, 255, 0.04); }
.ob-repo-item input[type="checkbox"] { margin-top: 0.2rem; accent-color: #6366f1; }
.ob-repo-info { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.ob-repo-name { font-weight: 600; font-size: 0.82rem; color: #e2e8f0; }
.ob-repo-path { font-size: 0.8rem; color: #94a3b8; font-family: monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-repo-origin { font-size: 0.8rem; color: #8a9aa8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Two-step confirmation input */
.ob-confirm-input {
  display: flex; gap: 0.5rem; align-items: center; margin-top: 0.75rem;
}
.ob-confirm-input input {
  font-family: monospace; font-size: 0.85rem;
  padding: 0.375rem 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.25rem;
  color: #e2e8f0;
  width: 12rem;
}
.ob-confirm-input code {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

/* Status pill inline */
.ob-status {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.ob-status-ok { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.ob-status-warn { background: rgba(234, 179, 8, 0.15); color: #ca8a04; }
.ob-status-danger { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.ob-status-info { background: rgba(99, 102, 241, 0.15); color: #818cf8; }

/* Empty state for detail panels */
.ob-empty {
  text-align: center; padding: 2rem 1rem; color: #94a3b8; font-size: 0.88rem;
}

/* Responsive */
@media (max-width: 768px) {
  .ob-layout { grid-template-columns: 1fr; }
  .ob-stepper { display: flex; overflow-x: auto; gap: 0; padding-bottom: 1rem; }
  .ob-stepper::before { display: none; }
  .ob-step { flex-direction: column; align-items: center; text-align: center; padding: 0.5rem; min-width: 80px; }
}

/* Light theme overrides */
[data-theme="light"] .ob-step-node { background: #f1f5f9; border-color: rgba(0, 0, 0, 0.1); color: #94a3b8; }
[data-theme="light"] .ob-step-title { color: #1e293b; }
[data-theme="light"] .ob-step.locked .ob-step-title { color: #94a3b8; }
[data-theme="light"] .ob-step-subtitle { color: #8a9aa8; }
[data-theme="light"] .ob-detail { background: rgba(0, 0, 0, 0.015); border-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .ob-detail-title { border-bottom-color: rgba(0, 0, 0, 0.06); color: #475569; }
[data-theme="light"] .ob-detail-label { color: #475569; }
[data-theme="light"] .ob-detail-value { color: #1e293b; }
[data-theme="light"] .ob-detail-section h4 { color: #334155; }
[data-theme="light"] .ob-consent-item { background: rgba(0, 0, 0, 0.015); }
[data-theme="light"] .ob-consent-num { color: #8a9aa8; }
[data-theme="light"] .ob-consent-q { color: #334155; }
[data-theme="light"] .ob-scan-stat-label { color: #8a9aa8; }
[data-theme="light"] .ob-scan-card-date { color: #8a9aa8; }
[data-theme="light"] .ob-repo-card-path { color: #8a9aa8; }
[data-theme="light"] .ob-repo-card-origin { color: #6366f1; }
[data-theme="light"] .ob-empty { color: #8a9aa8; }
[data-theme="light"] .ob-report-table th { border-bottom-color: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .ob-report-table td { color: #1e293b; border-bottom-color: rgba(0, 0, 0, 0.04); }
[data-theme="light"] .ob-warning { background: rgba(220, 38, 38, 0.05); color: #991b1b; }
[data-theme="light"] .ob-warning strong { color: #dc2626; }
[data-theme="light"] .ob-btn { border-color: rgba(0, 0, 0, 0.1); color: #8a9aa8; }
[data-theme="light"] .ob-btn:hover { border-color: rgba(0, 0, 0, 0.2); color: #1e293b; }
[data-theme="light"] .ob-page-header { border-bottom-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .ob-confirm-input input { background: rgba(0, 0, 0, 0.03); border-color: rgba(0, 0, 0, 0.1); color: #1e293b; }
[data-theme="light"] .ob-stepper::before { background: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .ob-scan-stat-card.ob-stat-cyan { background: rgba(6, 182, 212, 0.06); border-color: rgba(6, 182, 212, 0.15); }
[data-theme="light"] .ob-scan-stat-card.ob-stat-indigo { background: rgba(99, 102, 241, 0.06); border-color: rgba(99, 102, 241, 0.15); }
[data-theme="light"] .ob-scan-stat-card.ob-stat-amber { background: rgba(245, 158, 11, 0.06); border-color: rgba(245, 158, 11, 0.15); }
[data-theme="light"] .ob-stat-cyan .ob-scan-stat-num { color: #0891b2; }
[data-theme="light"] .ob-stat-indigo .ob-scan-stat-num { color: #6366f1; }
[data-theme="light"] .ob-stat-amber .ob-scan-stat-num { color: #d97706; }
[data-theme="light"] .ob-scan-card { background: rgba(6, 182, 212, 0.03); border-color: rgba(6, 182, 212, 0.1); }
[data-theme="light"] .ob-scan-card:hover { background: rgba(6, 182, 212, 0.06); }
[data-theme="light"] .ob-scan-card-host { color: #1e293b; }
[data-theme="light"] .ob-scan-os-badge.os-darwin { background: rgba(14, 165, 233, 0.1); color: #0284c7; }
[data-theme="light"] .ob-scan-os-badge.os-linux { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
[data-theme="light"] .ob-scan-os-badge.os-windows { background: rgba(168, 85, 247, 0.1); color: #9333ea; }
[data-theme="light"] .ob-scan-repo-count { color: #b45309; background: rgba(245, 158, 11, 0.08); }
[data-theme="light"] .ob-repo-card { background: rgba(99, 102, 241, 0.03); border-color: rgba(99, 102, 241, 0.08); }
[data-theme="light"] .ob-repo-card-name code { color: #6366f1; }
[data-theme="light"] .ob-section-scans h4 { color: #0891b2 !important; }
[data-theme="light"] .ob-section-repos h4 { color: #6366f1 !important; }
[data-theme="light"] .ob-section-checkins h4 { color: #d97706 !important; }
[data-theme="light"] .ob-repo-list { border-color: rgba(0, 0, 0, 0.08); background: rgba(0, 0, 0, 0.015); }
[data-theme="light"] .ob-repo-item { border-bottom-color: rgba(0, 0, 0, 0.04); }
[data-theme="light"] .ob-repo-item:hover { background: rgba(0, 0, 0, 0.03); }
[data-theme="light"] .ob-repo-name { color: #1e293b; }
[data-theme="light"] .ob-repo-path { color: #8a9aa8; }
[data-theme="light"] .ob-repo-origin { color: #94a3b8; }
[data-theme="light"] .ob-checkin-badge { background: rgba(245, 158, 11, 0.12); color: #b45309; }
[data-theme="light"] .ob-checkin-timeline::before { background: rgba(245, 158, 11, 0.15); }
[data-theme="light"] .ob-checkin-dot { background: #d97706; box-shadow: 0 0 6px rgba(217, 119, 6, 0.25); }
[data-theme="light"] .ob-checkin-time { color: #1e293b; }
[data-theme="light"] .ob-checkin-host { color: #8a9aa8; }
[data-theme="light"] .ob-checkin-toggle { color: #b45309; background: rgba(245, 158, 11, 0.06); border-color: rgba(245, 158, 11, 0.15); }

/* ===== User Detail Tabs ===== */
.ud-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--pico-muted-border-color);
  margin-bottom: 1.25rem;
}
.ud-tab {
  padding: 0.6rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #8a9aa8;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.ud-tab:hover { color: #cbd5e1; }
.ud-tab.active {
  color: #a5b4fc;
  border-bottom-color: #6366f1;
}
.ud-tab .ud-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2em;
  height: 1.2em;
  padding: 0 0.3em;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border-radius: 0.75rem;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.ud-tab.active .ud-tab-count {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}
.ud-tab-panel { display: none; }
.ud-tab-panel.active { display: block; }

[data-theme="light"] .ud-tab { color: #94a3b8; }
[data-theme="light"] .ud-tab:hover { color: #334155; }
[data-theme="light"] .ud-tab.active { color: #6366f1; border-bottom-color: #6366f1; }
[data-theme="light"] .ud-tab .ud-tab-count { background: rgba(99, 102, 241, 0.08); color: #6366f1; }

/* ===== User Detail Page ===== */
.ud-page {
  max-width: 1104px;
  margin: 0 auto;
}

.ud-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  align-items: start;
}

.ud-loading {
  display: flex;
  justify-content: center;
  padding: 4rem 0;
}

.ud-empty {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--pico-muted-color);
  font-size: 0.85rem;
}

.ud-empty a {
  color: var(--pico-primary);
}

/* Sidebar - identity card */
.ud-sidebar {
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  position: sticky;
  top: 1rem;
}

.ud-identity {
  text-align: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
  margin-bottom: 1.25rem;
}

.ud-avatar-xl {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
  margin: 0 auto 1rem;
  flex-shrink: 0;
}

.ud-name {
  font-size: 1.25rem;
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.ud-handle {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.ud-badges {
  display: flex;
  gap: 0.375rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* Metadata grid */
.ud-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0.5rem;
}

.ud-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--pico-muted-border-color);
  font-size: 0.9rem;
}

.ud-meta-item:last-child {
  border-bottom: none;
}

.ud-meta-label {
  color: #818cf8;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.ud-meta-value {
  font-weight: 500;
  color: #f1f5f9;
  word-break: break-all;
  font-size: 0.85rem;
}

.ud-meta-value code {
  font-size: 0.9rem;
  padding: 0.15rem 0.35rem;
  margin-left: -0.35rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 0.25rem;
  color: #a5b4fc;
}

/* Action buttons */
.ud-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.ud-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: 1px solid var(--pico-muted-border-color);
  background: transparent;
  color: var(--pico-color);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.ud-btn:hover {
  border-color: var(--pico-primary);
  color: var(--pico-primary);
}

.ud-btn-primary {
  background: var(--pico-primary);
  border-color: var(--pico-primary);
  color: #fff;
  flex: 1;
}

.ud-btn-primary:hover {
  opacity: 0.9;
  color: #fff;
}

.ud-actions-deactivate {
  text-align: center;
  margin-top: 0.5rem;
}

.ud-btn-warning {
  color: #f59e0b;
  border-color: #f59e0b;
}

.ud-btn-warning:hover {
  background: #f59e0b;
  color: #fff;
}

.ud-btn-secondary {
  color: #22c55e;
  border-color: #22c55e;
}

.ud-btn-secondary:hover {
  background: #22c55e;
  color: #fff;
}

.ud-btn-danger {
  color: var(--pico-del-color);
  border-color: var(--pico-del-color);
}

.ud-btn-danger:hover {
  background: var(--pico-del-color);
  color: #fff;
}

.ud-btn-small {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
}

/* Main content - sections */
.ud-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ud-section {
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 0.75rem;
  overflow: hidden;
}

.ud-section-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
}

.ud-section-hdr h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.ud-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  height: 1.4em;
  padding: 0 0.35em;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--pubhub-font-body);
  background: rgba(99, 102, 241, 0.15);
  color: var(--pubhub-accent);
  border-radius: 1rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.ud-section-body {
  padding: 0.5rem 1.25rem;
}

/* API key items */
.ud-key-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--pico-muted-border-color);
}

.ud-key-item:last-child {
  border-bottom: none;
}

.ud-key-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-width: 0;
}

.ud-key-name {
  font-weight: 500;
  font-size: 0.95rem;
}

.ud-key-prefix code {
  font-size: 0.9rem;
  padding: 0.1rem 0.3rem;
  background: var(--pico-background-color);
  border-radius: 0.2rem;
}

.ud-key-type {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pico-muted-color);
  background: rgba(99, 102, 241, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 0.2rem;
}

.ud-key-date {
  font-size: 0.85rem;
  color: var(--pico-muted-color);
}

.ud-key-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

/* Service access rows */
.ud-access-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--pico-muted-border-color);
}

.ud-access-row:last-child {
  border-bottom: none;
}

.ud-access-service {
  color: inherit;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px dashed var(--pico-muted-color);
}

.ud-access-service:hover {
  color: var(--pico-primary);
  border-bottom-color: var(--pico-primary);
}

/* Working terms */
.ud-terms {
  padding: 0.5rem 0;
}

.ud-terms-status {
  margin-bottom: 0.75rem;
}

.ud-terms-meta {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
}

.ud-terms-meta:last-of-type {
  border-bottom: none;
}

.ud-terms-link {
  margin-top: 0.75rem;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
  .ud-layout {
    grid-template-columns: 1fr;
  }
  .ud-sidebar {
    position: static;
  }
  .ud-key-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

/* Light theme overrides */
[data-theme="light"] .ud-sidebar {
  background: var(--pubhub-bg-card);
  border-color: var(--pubhub-border-soft);
  box-shadow: var(--pubhub-shadow-subtle);
}

[data-theme="light"] .ud-section {
  background: var(--pubhub-bg-card);
  border-color: var(--pubhub-border-soft);
  box-shadow: var(--pubhub-shadow-subtle);
}

[data-theme="light"] .ud-meta-label { color: #4f46e5; }
[data-theme="light"] .ud-meta-value { color: #1e293b; }
[data-theme="light"] .ud-meta-value code {
  background: rgba(79, 70, 229, 0.06);
  border-color: rgba(79, 70, 229, 0.12);
  color: #4f46e5;
}
[data-theme="light"] .ud-key-prefix code {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .ud-section-hdr {
  border-bottom-color: var(--pubhub-border-soft);
}

[data-theme="light"] .ud-meta-item,
[data-theme="light"] .ud-key-item,
[data-theme="light"] .ud-access-row,
[data-theme="light"] .ud-terms-meta {
  border-bottom-color: var(--pubhub-border-soft);
}

[data-theme="light"] .ud-key-type {
  background: rgba(79, 70, 229, 0.08);
  color: var(--pubhub-accent-warm);
}

[data-theme="light"] .ud-count {
  background: rgba(79, 70, 229, 0.1);
  color: var(--pubhub-accent-warm);
}

/* ===== Commit Graph ===== */
.commit-graph-section {
  margin-bottom: 1.5rem;
  background: var(--pubhub-card-bg);
  border: 1px solid var(--pubhub-border);
  border-radius: var(--pubhub-radius-lg);
  padding: 1rem 1.25rem;
}

.commit-graph-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.commit-graph-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--pubhub-text);
  margin: 0;
}

.commit-graph-controls {
  display: flex;
  gap: 0.25rem;
}

.commit-range-btn {
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  font-family: var(--pubhub-font-mono);
  border: 1px solid var(--pubhub-border);
  border-radius: var(--pubhub-radius);
  background: transparent;
  color: var(--pubhub-text-dim);
  cursor: pointer;
  transition: all 0.15s;
}

.commit-range-btn:hover {
  border-color: var(--pubhub-accent);
  color: var(--pubhub-text);
}

.commit-range-btn.active {
  background: var(--pubhub-accent);
  border-color: var(--pubhub-accent);
  color: #fff;
}

.commit-graph-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.commit-graph-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.commit-legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.commit-legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.commit-legend-name {
  color: var(--pubhub-text-dim);
}

.commit-legend-val {
  color: var(--pubhub-text);
  font-weight: 600;
  font-family: var(--pubhub-font-mono);
  font-size: 0.8rem;
}

.commit-graph-svg-wrap {
  position: relative;
  width: 100%;
}

.commit-graph-svg {
  width: 100%;
  height: auto;
  display: block;
}

.commit-hover-col {
  cursor: crosshair;
}

.commit-hover-line {
  stroke: rgba(255,255,255,0.15);
  stroke-width: 1;
  display: none;
}

.machine-online-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 2px;
  vertical-align: middle;
}

/* ── Daily Nudge Modal ── */

@keyframes nudgeFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes nudgeSlideUp {
  from { opacity: 0; transform: translateY(32px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes nudgeFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes nudgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 81, 73, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(248, 81, 73, 0); }
}

@keyframes nudgeGlow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

.nudge-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  animation: nudgeFadeIn 0.4s ease;
}

.nudge-overlay.nudge-fade-out {
  animation: nudgeFadeOut 0.25s ease forwards;
}

.nudge-container {
  max-width: 780px;
  width: 92%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: nudgeSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.nudge-card {
  background: #13161c;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
}

.nudge-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), transparent);
}

.nudge-header {
  padding: 22px 28px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.nudge-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.nudge-label {
  font-family: var(--pubhub-font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #818cf8;
}

.nudge-date {
  font-family: var(--pubhub-font-body);
  font-size: 0.8rem;
  color: #93c5fd;
  font-variant-numeric: tabular-nums;
}

.nudge-header-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nudge-heading {
  font-family: var(--pubhub-font-heading);
  font-size: 1.32rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.nudge-severity {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.nudge-severity.normal {
  background: #238636;
  box-shadow: 0 0 8px rgba(35, 134, 54, 0.4);
}

.nudge-severity.warning {
  background: #d29922;
  box-shadow: 0 0 8px rgba(210, 153, 34, 0.4);
}

.nudge-severity.critical {
  background: #f85149;
  animation: nudgePulse 2s ease-in-out infinite;
}

.nudge-body {
  padding: 20px 28px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.nudge-message {
  font-family: var(--pubhub-font-body);
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
  white-space: pre-wrap;
}

.nudge-remarks {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--pubhub-font-body);
  font-size: 0.84rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}

.nudge-stats {
  margin-top: 14px;
  font-family: var(--pubhub-font-body);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.78);
  font-variant-numeric: tabular-nums;
}

.nudge-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.nudge-link {
  font-family: var(--pubhub-font-body);
  font-size: 0.8rem;
  color: #818cf8;
  text-decoration: none;
  transition: color 0.2s;
}

.nudge-link:hover {
  color: rgba(99, 102, 241, 1);
}

.nudge-actions {
  display: flex;
  gap: 10px;
}

.nudge-btn-primary {
  font-family: var(--pubhub-font-body);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  background: #6366f1;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.nudge-btn-primary:hover {
  background: #5558e6;
}

.nudge-btn-secondary {
  font-family: var(--pubhub-font-body);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 0.2s;
}

.nudge-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.nudge-comment-section {
  padding: 0 28px 8px;
  flex-shrink: 0;
}

.nudge-followup-section {
  padding: 0 28px 8px;
  flex-shrink: 0;
}

.nudge-followup-question {
  font-size: 0.95rem;
  font-weight: 500;
  color: #e2e8f0;
  margin-bottom: 10px;
  line-height: 1.5;
}

.nudge-char-counter {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 6px;
  text-align: right;
  transition: color 0.2s;
}

.nudge-char-counter.nudge-char-met {
  color: #34d399;
}

.nudge-btn-reject {
  font-family: var(--pubhub-font-body);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 20px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
  cursor: pointer;
  transition: all 0.2s;
}

.nudge-btn-reject:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
}

.nudge-terms {
  padding: 12px 28px 4px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nudge-terms p { margin: 0; }

.nudge-rejected-page {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.nudge-rejected-content {
  text-align: center;
  max-width: 600px;
}

.nudge-rejected-content h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #ef4444;
  margin: 24px 0 16px;
}

.nudge-rejected-message {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #e2e8f0;
  margin: 0 0 12px;
}

.nudge-rejected-sub {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #94a3b8;
  margin: 0 0 32px;
}

.nudge-rejected-terms {
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.nudge-rejected-terms h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0 0 8px;
}

.nudge-rejected-terms p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #94a3b8;
  margin: 0 0 6px;
}

.nudge-rejected-remarks {
  font-style: italic;
  border-left: 3px solid #6366f1;
  padding-left: 12px;
}

.nudge-rejected-tasks {
  font-weight: 600;
  color: #e2e8f0 !important;
}

.nudge-comment {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--pubhub-font-body);
  font-size: 0.84rem;
  padding: 10px 14px;
  resize: vertical;
  transition: border-color 0.2s;
}

.nudge-comment:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.5);
}

.nudge-comment-required {
  border-color: #f85149 !important;
}

.nudge-comment-display {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-family: var(--pubhub-font-body);
  font-size: 0.84rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.nudge-comment-badge {
  font-size: 0.8rem;
  vertical-align: middle;
  cursor: help;
}

/* Light theme */
[data-theme="light"] .nudge-overlay {
  background: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .nudge-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .nudge-card::before {
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.25), transparent);
}

[data-theme="light"] .nudge-header {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .nudge-heading {
  color: rgba(0, 0, 0, 0.88);
}

[data-theme="light"] .nudge-date {
  color: #2563eb;
}

[data-theme="light"] .nudge-message {
  color: rgba(0, 0, 0, 0.85);
}

[data-theme="light"] .nudge-remarks {
  color: rgba(0, 0, 0, 0.7);
  border-top-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .nudge-stats {
  color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .nudge-footer {
  border-top-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .nudge-link {
  color: rgba(99, 102, 241, 0.8);
}

[data-theme="light"] .nudge-link:hover {
  color: #6366f1;
}

[data-theme="light"] .nudge-btn-secondary {
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.8);
}

[data-theme="light"] .nudge-btn-secondary:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.25);
  color: rgba(0, 0, 0, 0.9);
}

[data-theme="light"] .nudge-comment {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.8);
}

[data-theme="light"] .nudge-comment:focus {
  border-color: rgba(99, 102, 241, 0.5);
}

[data-theme="light"] .nudge-comment-display {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.75);
}

[data-theme="light"] .nudge-followup-question {
  color: rgba(0, 0, 0, 0.85);
}

[data-theme="light"] .nudge-char-counter {
  color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .nudge-char-counter.nudge-char-met {
  color: #059669;
}

/* ── Nudges Admin Page ── */

.nudges-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  gap: 1rem;
}

.nudges-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.nudge-range-btn {
  font-family: var(--pubhub-font-body);
  font-size: 0.96rem;
  height: 36px;
  line-height: 34px;
  padding: 0 16px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.15s;
}

.nudge-range-btn:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.8);
}

.nudge-range-btn.active {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.35);
  font-weight: 600;
}

.nudge-count {
  font-family: var(--pubhub-font-body);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.5);
  font-variant-numeric: tabular-nums;
}

.nudges-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
  font-family: var(--pubhub-font-body);
  font-size: 0.92rem;
}

.nudges-table th {
  text-align: left;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  border-bottom: none;
}

.nudges-table td {
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.85);
  vertical-align: top;
  border-bottom: none;
  background: rgba(255, 255, 255, 0.015);
  font-variant-numeric: tabular-nums;
}

.nudges-table td:first-child { border-radius: 8px 0 0 8px; }
.nudges-table td:last-child { border-radius: 0 8px 8px 0; }

.nudge-row { cursor: pointer; transition: transform 0.1s; }
.nudge-row:hover td { background: rgba(99, 102, 241, 0.08); }
.nudge-row:hover { transform: scale(1.002); }

.nudge-msg-full { display: none; white-space: pre-wrap; }
.nudge-row.expanded .nudge-msg-short { display: none; }
.nudge-row.expanded .nudge-msg-full { display: inline; }

.nudge-severity-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
}

.nudge-severity-dot.normal { background: #3fb950; box-shadow: 0 0 6px rgba(63, 185, 80, 0.3); }
.nudge-severity-dot.warning { background: #d29922; box-shadow: 0 0 6px rgba(210, 153, 34, 0.3); }
.nudge-severity-dot.critical { background: #f85149; box-shadow: 0 0 6px rgba(248, 81, 73, 0.4); animation: nudgePulse 2s ease-in-out infinite; }

.nudge-response-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.nudge-response-badge.noted { background: rgba(63, 185, 80, 0.12); color: #3fb950; border: 1px solid rgba(63, 185, 80, 0.2); }
.nudge-response-badge.not-relevant { background: rgba(255, 255, 255, 0.05); color: rgba(255, 255, 255, 0.55); border: 1px solid rgba(255, 255, 255, 0.12); }
.nudge-response-badge.rejected { background: rgba(239, 68, 68, 0.12); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.25); }
.nudge-response-badge.unread { background: rgba(210, 153, 34, 0.12); color: #d29922; border: 1px solid rgba(210, 153, 34, 0.2); }
.nudge-response-badge.none { color: rgba(255, 255, 255, 0.3); }

.nudge-waiting {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(210, 153, 34, 0.7);
  letter-spacing: 0.02em;
}

#nudge-user-filter,
#nudge-severity-filter,
#nudge-response-filter {
  font-family: var(--pubhub-font-body);
  font-size: 0.96rem;
  height: 36px !important;
  line-height: 34px;
  padding: 0 10px !important;
  margin: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 6px;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.8);
  box-sizing: border-box;
  width: auto !important;
  flex: 0 0 auto;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  padding-right: 26px !important;
}

/* Light theme */
[data-theme="light"] .nudges-toolbar {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .nudge-range-btn {
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.55);
}

[data-theme="light"] .nudge-range-btn:hover {
  border-color: rgba(0, 0, 0, 0.2);
  color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .nudge-range-btn.active {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
  border-color: rgba(99, 102, 241, 0.25);
}

[data-theme="light"] .nudge-count { color: rgba(0, 0, 0, 0.5); }

[data-theme="light"] .nudges-table th {
  color: rgba(0, 0, 0, 0.55);
}

[data-theme="light"] .nudges-table td {
  color: rgba(0, 0, 0, 0.82);
  background: rgba(0, 0, 0, 0.015);
}

[data-theme="light"] .nudge-row:hover td { background: rgba(99, 102, 241, 0.06); }

[data-theme="light"] .nudge-severity-dot.normal { background: #1a7f37; box-shadow: 0 0 6px rgba(26, 127, 55, 0.2); }
[data-theme="light"] .nudge-severity-dot.warning { background: #9a6700; box-shadow: 0 0 6px rgba(154, 103, 0, 0.2); }
[data-theme="light"] .nudge-severity-dot.critical { background: #cf222e; box-shadow: 0 0 6px rgba(207, 34, 46, 0.3); }

[data-theme="light"] .nudge-response-badge.noted { background: rgba(26, 127, 55, 0.08); color: #1a7f37; border-color: rgba(26, 127, 55, 0.15); }
[data-theme="light"] .nudge-response-badge.not-relevant { background: rgba(0, 0, 0, 0.04); color: rgba(0, 0, 0, 0.55); border-color: rgba(0, 0, 0, 0.1); }
[data-theme="light"] .nudge-response-badge.rejected { background: rgba(239, 68, 68, 0.06); color: #dc2626; border-color: rgba(239, 68, 68, 0.15); }
[data-theme="light"] .nudge-response-badge.unread { background: rgba(154, 103, 0, 0.08); color: #9a6700; border-color: rgba(154, 103, 0, 0.15); }
[data-theme="light"] .nudge-response-badge.none { color: rgba(0, 0, 0, 0.3); }
[data-theme="light"] .nudge-waiting { color: rgba(154, 103, 0, 0.6); }

/* Nudge detail modal */
.nudge-detail-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  animation: nudgeFadeIn 0.3s ease;
}
.nudge-detail-card {
  width: 520px; max-width: 92vw; max-height: 85vh; overflow-y: auto;
  border-radius: 1rem; background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  animation: nudgeSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.nudge-detail-banner {
  padding: 1.25rem 1.5rem; display: flex; align-items: center; gap: 1rem;
  border-radius: 1rem 1rem 0 0; position: relative;
}
.nudge-detail-banner.severity-normal {
  background: linear-gradient(135deg, rgba(63, 185, 80, 0.15), rgba(63, 185, 80, 0.03));
  border-bottom: 2px solid rgba(63, 185, 80, 0.25);
}
.nudge-detail-banner.severity-warning {
  background: linear-gradient(135deg, rgba(210, 153, 34, 0.2), rgba(210, 153, 34, 0.03));
  border-bottom: 2px solid rgba(210, 153, 34, 0.3);
}
.nudge-detail-banner.severity-critical {
  background: linear-gradient(135deg, rgba(248, 81, 73, 0.2), rgba(248, 81, 73, 0.03));
  border-bottom: 2px solid rgba(248, 81, 73, 0.3);
}
.nudge-detail-sev-icon { flex-shrink: 0; }
.nudge-detail-sev-icon svg { width: 32px; height: 32px; }
.nudge-detail-sev-icon.normal svg { color: #3fb950; }
.nudge-detail-sev-icon.warning svg { color: #d29922; }
.nudge-detail-sev-icon.critical svg { width: 40px; height: 40px; color: #f85149; filter: drop-shadow(0 0 6px rgba(248, 81, 73, 0.4)); }
.nudge-detail-banner-text h3 { margin: 0; font-size: 1.05rem; font-weight: 700; color: #e2e8f0; }
.nudge-detail-banner-sub { font-size: 0.82rem; color: #94a3b8; margin-top: 0.125rem; }
.nudge-detail-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 28px; height: 28px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6); font-size: 1.1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.nudge-detail-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.nudge-detail-body { padding: 1.25rem 1.5rem; }
.nudge-detail-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.375rem 0; font-size: 0.82rem;
}
.nudge-detail-label { color: #8a9aa8; font-weight: 500; }
.nudge-detail-value { color: #e2e8f0; text-align: right; }
.nudge-detail-section {
  margin-top: 1rem; padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.nudge-detail-section h4 {
  font-size: 0.8rem; font-weight: 700; color: #8a9aa8;
  text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 0.5rem;
}
.nudge-detail-message {
  padding: 0.75rem 1rem; font-size: 0.82rem; color: #cbd5e1; line-height: 1.6;
  white-space: pre-wrap; background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 0.5rem;
  border-left: 3px solid rgba(255, 255, 255, 0.12);
}
.nudge-detail-comment {
  font-size: 0.82rem; color: #a5b4fc; line-height: 1.5;
  padding: 0.625rem 0.75rem; background: rgba(99, 102, 241, 0.06);
  border-left: 3px solid #6366f1; border-radius: 0 0.375rem 0.375rem 0;
}
.nudge-detail-assessment {
  font-size: 0.82rem; color: #fbbf24; line-height: 1.5;
  padding: 0.625rem 0.75rem; background: rgba(245, 158, 11, 0.06);
  border-left: 3px solid #f59e0b; border-radius: 0 0.375rem 0.375rem 0;
  font-style: italic;
}
.nudge-detail-actions {
  display: flex; gap: 0.625rem; justify-content: center;
  padding: 1rem 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.nudge-detail-btn {
  padding: 0.5rem 1rem; border-radius: 0.375rem; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  border: 1px solid rgba(255, 255, 255, 0.1); background: transparent; color: #94a3b8;
}
.nudge-detail-btn:hover { border-color: rgba(255, 255, 255, 0.25); color: #e2e8f0; }
.nudge-detail-btn-danger { color: #fca5a5; border-color: rgba(220, 38, 38, 0.3); background: rgba(220, 38, 38, 0.08); }
.nudge-detail-btn-danger:hover { background: rgba(220, 38, 38, 0.15); color: #ef4444; border-color: rgba(220, 38, 38, 0.5); }

/* Light theme nudge detail */
[data-theme="light"] .nudge-detail-card { background: #fff; border-color: rgba(0, 0, 0, 0.08); box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12); }
[data-theme="light"] .nudge-detail-banner.severity-normal { background: linear-gradient(135deg, rgba(26, 127, 55, 0.08), transparent); border-bottom-color: rgba(26, 127, 55, 0.15); }
[data-theme="light"] .nudge-detail-banner.severity-warning { background: linear-gradient(135deg, rgba(154, 103, 0, 0.08), transparent); border-bottom-color: rgba(154, 103, 0, 0.15); }
[data-theme="light"] .nudge-detail-banner.severity-critical { background: linear-gradient(135deg, rgba(207, 34, 46, 0.08), transparent); border-bottom-color: rgba(207, 34, 46, 0.15); }
[data-theme="light"] .nudge-detail-banner-text h3 { color: #1e293b; }
[data-theme="light"] .nudge-detail-banner-sub { color: #8a9aa8; }
[data-theme="light"] .nudge-detail-close { background: rgba(0, 0, 0, 0.04); color: rgba(0, 0, 0, 0.5); }
[data-theme="light"] .nudge-detail-close:hover { background: rgba(0, 0, 0, 0.08); color: rgba(0, 0, 0, 0.85); }
[data-theme="light"] .nudge-detail-label { color: #94a3b8; }
[data-theme="light"] .nudge-detail-value { color: #1e293b; }
[data-theme="light"] .nudge-detail-section { border-top-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .nudge-detail-message { background: rgba(0, 0, 0, 0.02); border-color: rgba(0, 0, 0, 0.06); border-left-color: rgba(0, 0, 0, 0.1); color: #475569; }
[data-theme="light"] .nudge-detail-comment { background: rgba(99, 102, 241, 0.04); color: #4f46e5; }
[data-theme="light"] .nudge-detail-assessment { background: rgba(245, 158, 11, 0.04); color: #b45309; }
[data-theme="light"] .nudge-detail-actions { border-top-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .nudge-detail-btn { border-color: rgba(0, 0, 0, 0.1); color: #8a9aa8; }
[data-theme="light"] .nudge-detail-btn:hover { border-color: rgba(0, 0, 0, 0.2); color: #1e293b; }
[data-theme="light"] .nudge-detail-btn-danger { color: #dc2626; border-color: rgba(220, 38, 38, 0.2); background: rgba(220, 38, 38, 0.04); }

[data-theme="light"] #nudge-user-filter,
[data-theme="light"] #nudge-severity-filter,
[data-theme="light"] #nudge-response-filter {
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: rgba(0, 0, 0, 0.7);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23555'/%3E%3C/svg%3E") !important;
}

/* ── Access Log ─────────────────────────────────────────────── */
.accesslog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  gap: 1rem;
}

.accesslog-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.accesslog-controls select {
  font-family: var(--pubhub-font-body);
  font-size: 0.96rem;
  height: 36px !important;
  line-height: 34px;
  padding: 0 10px !important;
  margin: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 6px;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.8);
  box-sizing: border-box;
  width: auto !important;
  flex: 0 0 auto;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  padding-right: 26px !important;
}

.accesslog-count {
  font-family: var(--pubhub-font-body);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.5);
  font-variant-numeric: tabular-nums;
}

.accesslog-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
  font-family: var(--pubhub-font-body);
  font-size: 0.92rem;
}

.accesslog-table th {
  text-align: left;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  border-bottom: none;
}

.accesslog-table td {
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.85);
  vertical-align: middle;
  border-bottom: none;
  background: rgba(255, 255, 255, 0.015);
  font-variant-numeric: tabular-nums;
}

.accesslog-table td:first-child { border-radius: 8px 0 0 8px; }
.accesslog-table td:last-child { border-radius: 0 8px 8px 0; }

.accesslog-row:hover td { background: rgba(99, 102, 241, 0.08); }

.accesslog-user-pill {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
  border: 1px solid;
  white-space: nowrap;
}

.accesslog-type-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.accesslog-type-badge.sso { background: rgba(99, 102, 241, 0.12); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.2); }
.accesslog-type-badge.mcp { background: rgba(63, 185, 80, 0.12); color: #3fb950; border: 1px solid rgba(63, 185, 80, 0.2); }
.accesslog-type-badge.login { background: rgba(210, 153, 34, 0.12); color: #d29922; border: 1px solid rgba(210, 153, 34, 0.2); }
.accesslog-type-badge.service { background: rgba(255, 255, 255, 0.04); color: rgba(255, 255, 255, 0.5); border: 1px solid rgba(255, 255, 255, 0.08); }

.accesslog-ip {
  font-family: var(--pubhub-font-mono, 'SF Mono', monospace);
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.4);
}

.accesslog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.2rem;
  padding: 10px 0;
}

.accesslog-page-btn {
  font-family: var(--pubhub-font-body);
  font-size: 0.92rem;
  padding: 6px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.15s;
}

.accesslog-page-btn:hover:not(:disabled) {
  border-color: rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}

.accesslog-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.accesslog-page-info {
  font-family: var(--pubhub-font-body);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
}

/* Access Log light theme */
[data-theme="light"] .accesslog-toolbar {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .accesslog-count { color: rgba(0, 0, 0, 0.5); }

[data-theme="light"] .accesslog-controls select {
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: rgba(0, 0, 0, 0.7);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23555'/%3E%3C/svg%3E") !important;
}

[data-theme="light"] .accesslog-table th { color: rgba(0, 0, 0, 0.55); }
[data-theme="light"] .accesslog-table td { color: rgba(0, 0, 0, 0.82); background: rgba(0, 0, 0, 0.015); }
[data-theme="light"] .accesslog-row:hover td { background: rgba(99, 102, 241, 0.06); }

[data-theme="light"] .accesslog-type-badge.sso { background: rgba(99, 102, 241, 0.08); color: #6366f1; border-color: rgba(99, 102, 241, 0.15); }
[data-theme="light"] .accesslog-type-badge.mcp { background: rgba(26, 127, 55, 0.08); color: #1a7f37; border-color: rgba(26, 127, 55, 0.15); }
[data-theme="light"] .accesslog-type-badge.login { background: rgba(154, 103, 0, 0.08); color: #9a6700; border-color: rgba(154, 103, 0, 0.15); }
[data-theme="light"] .accesslog-type-badge.service { background: rgba(0, 0, 0, 0.04); color: rgba(0, 0, 0, 0.55); border-color: rgba(0, 0, 0, 0.1); }

[data-theme="light"] .accesslog-ip { color: rgba(0, 0, 0, 0.5); }

[data-theme="light"] .accesslog-page-btn {
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.6);
}
[data-theme="light"] .accesslog-page-btn:hover:not(:disabled) {
  border-color: rgba(99, 102, 241, 0.3);
  color: #6366f1;
}
[data-theme="light"] .accesslog-page-info { color: rgba(0, 0, 0, 0.5); }

/* Preview modal reuses nudge-card structure with admin-specific additions */
.nudge-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  animation: nudgeSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nudge-preview-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a5b4fc;
}

.nudge-preview-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 10px;
  line-height: 1;
  border-radius: 8px;
  transition: all 0.15s;
}
.nudge-preview-close:hover { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.9); }

.nudge-sev-icon { flex-shrink: 0; }
.nudge-sev-icon svg { width: 26px; height: 26px; }
.nudge-sev-icon.normal svg { color: #3fb950; }
.nudge-sev-icon.warning svg { color: #d29922; }
.nudge-sev-icon.critical svg { width: 52px; height: 52px; color: #ff4433; filter: drop-shadow(0 0 8px rgba(255, 68, 51, 0.5)); }

[data-theme="light"] .nudge-preview-badge { color: #4f46e5; }
[data-theme="light"] .nudge-preview-close { background: rgba(0, 0, 0, 0.06); color: rgba(0, 0, 0, 0.5); }
[data-theme="light"] .nudge-preview-close:hover { background: rgba(0, 0, 0, 0.1); color: rgba(0, 0, 0, 0.85); }
[data-theme="light"] .nudge-sev-icon.normal svg { color: #1a7f37; }
[data-theme="light"] .nudge-sev-icon.warning svg { color: #9a6700; }
[data-theme="light"] .nudge-sev-icon.critical svg { width: 52px; height: 52px; color: #dc2626; filter: drop-shadow(0 0 6px rgba(220, 38, 38, 0.35)); }

.btn-preview {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  opacity: 0.7;
  vertical-align: middle;
  display: inline-flex;
  color: #818cf8;
}
.btn-preview svg { width: 16px; height: 16px; stroke: currentColor; }
.btn-preview:hover { opacity: 1; transform: scale(1.15); }
.btn-reset {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  opacity: 0.7;
  vertical-align: middle;
  display: inline-flex;
  color: #f59e0b;
}
.btn-reset svg { width: 16px; height: 16px; stroke: currentColor; }
.btn-reset:hover { opacity: 1; transform: scale(1.15); }

/* ===== Heartbeat sidebar indicator ===== */
.ud-heartbeat-indicator {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding: 0.4rem 0.6rem;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.8rem;
}
.ud-heartbeat-indicator:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.2);
}
.ud-heartbeat-icon {
  display: flex;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.ud-heartbeat-icon svg { width: 18px; height: 18px; }
.ud-heartbeat-icon.online { color: #22c55e; animation: ud-pulse-heart 2s ease-in-out infinite; }
.ud-heartbeat-icon.offline { color: #8a9aa8; }
.ud-heartbeat-text { color: #94a3b8; font-weight: 500; }
.ud-heartbeat-ts { color: #8a9aa8; width: 100%; padding-left: 22px; font-size: 0.8rem; font-variant-numeric: tabular-nums; margin-top: -0.15rem; }

@keyframes ud-pulse-heart {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.15); }
  30% { transform: scale(1); }
  45% { transform: scale(1.1); }
  60% { transform: scale(1); }
}

/* ===== Machine cards ===== */
.mc-heart-icon { display: inline-flex; width: 18px; height: 18px; color: #818cf8; vertical-align: -3px; margin-right: 0.15rem; }
.mc-heart-icon svg { width: 18px; height: 18px; }

.mc-cards { display: flex; flex-direction: column; gap: 1rem; padding: 0.5rem 0; }

.mc-card {
  padding: 0;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 0.625rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}
.mc-card:hover { border-color: rgba(99, 102, 241, 0.25); }

.mc-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(6, 182, 212, 0.05));
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}
.mc-card-identity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
}
.mc-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: #94a3b8;
}
.mc-card-body { padding: 1rem 1.25rem; }

.mc-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mc-status-dot.mc-online { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.5); }
.mc-status-dot.mc-offline { background: #64748b; }

.mc-hostname { color: #e2e8f0; }
.mc-app-badge {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.1rem 0.4rem;
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border-radius: 0.25rem;
}
.mc-os { font-family: monospace; font-size: 0.82rem; }
.mc-status-text { font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; padding: 0.15rem 0.5rem; border-radius: 0.25rem; }
.mc-status-on { color: #22c55e; background: rgba(34, 197, 94, 0.1); }
.mc-status-off { color: #8a9aa8; background: rgba(100, 116, 139, 0.1); }

/* Metrics bars */
.mc-metrics {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem 0;
  flex-wrap: nowrap;
}
.mc-metric {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex-wrap: nowrap;
}
.mc-metric-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  width: 32px;
  flex-shrink: 0;
  white-space: nowrap;
}
.mc-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}
.mc-bar-fill {
  height: 100%;
  background: #6366f1;
  border-radius: 2px;
  transition: width 0.3s ease;
}
.mc-bar-fill.mc-bar-warn { background: #f59e0b; }
.mc-metric-val {
  font-size: 0.85rem;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: fit-content;
  flex-shrink: 0;
  text-align: right;
}

.mc-last-seen {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #cbd5e1;
  padding: 0.4rem 0;
  margin-bottom: 0.75rem;
}

.mc-meta-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #818cf8;
}

/* Repos */
.mc-repos {
  border-top: 1px solid rgba(99, 102, 241, 0.08);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}
.mc-repos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.mc-repo-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.12);
  padding: 0.05rem 0.4rem;
  border-radius: 1rem;
}

.mc-repo-list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.mc-repo-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.85rem;
}
.mc-repo-name {
  font-weight: 500;
  color: #e2e8f0;
  white-space: nowrap;
}
.mc-repo-version {
  font-size: 0.8rem;
  font-family: monospace;
  color: #22c55e;
  padding: 0.05rem 0.3rem;
  background: rgba(34, 197, 94, 0.08);
  border-radius: 0.2rem;
}
.mc-repo-origin {
  font-size: 0.8rem;
  font-family: monospace;
  color: #8a9aa8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-left: auto;
}

.mc-repos-toggle {
  background: none;
  border: none;
  color: #818cf8;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0;
  font-weight: 500;
}
.mc-repos-toggle:hover { color: #a5b4fc; text-decoration: underline; }

/* Repo history timeline */
.mc-history {
  border-top: 1px solid var(--pico-muted-border-color);
  padding-top: 0.5rem;
  margin-top: 0.4rem;
}
.mc-history-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.85rem;
}
.mc-history-action {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.mc-history-action.mc-added {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}
.mc-history-action.mc-removed {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}
.mc-history-repo { color: #94a3b8; font-weight: 500; }
.mc-history-ts { margin-left: auto; color: #8a9aa8; font-variant-numeric: tabular-nums; font-size: 0.8rem; }

/* ===== Nuke icon for offboard step 4 ===== */
.ob-step4-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.ob-nuke-icon {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -0.25rem -0.25rem 0 0;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}
.ob-nuke-symbol {
  font-size: 64px;
  line-height: 1;
  color: #eab308;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
}
.ob-nuke-icon.ob-nuke-active {
  opacity: 0.7;
  animation: ob-nuke-glow 3s ease-in-out infinite;
}

@keyframes ob-nuke-glow {
  0%, 100% { opacity: 0.5; filter: drop-shadow(0 0 0 transparent); }
  50% { opacity: 0.85; filter: drop-shadow(0 0 12px rgba(234, 179, 8, 0.4)); }
}

/* ===== Light theme overrides ===== */
[data-theme="light"] .ud-heartbeat-indicator { background: rgba(79, 70, 229, 0.05); border-color: rgba(79, 70, 229, 0.12); }
[data-theme="light"] .ud-heartbeat-text { color: #475569; }
[data-theme="light"] .ud-heartbeat-ts { color: #94a3b8; }
[data-theme="light"] .mc-card { background: rgba(0, 0, 0, 0.01); border-color: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .mc-card:hover { border-color: rgba(99, 102, 241, 0.2); }
[data-theme="light"] .mc-card-header { background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(6, 182, 212, 0.03)); border-bottom-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .mc-hostname { color: #1e293b; }
[data-theme="light"] .mc-app-badge { background: rgba(79, 70, 229, 0.08); color: #6366f1; }
[data-theme="light"] .mc-bar { background: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .mc-metric-val { color: #8a9aa8; }
[data-theme="light"] .mc-repo-name { color: #1e293b; }
[data-theme="light"] .mc-repo-version { background: rgba(34, 197, 94, 0.06); }
[data-theme="light"] .mc-repo-origin { color: #94a3b8; }
[data-theme="light"] .mc-history-repo { color: #475569; }
