/* =========================================================================
   ENTERPRISE LIGHT DESIGN SYSTEM
   ========================================================================= */

:root {
  /* Backgrounds */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f8fafc;
  --bg-input-focus: #ffffff;
  --bg-elevated: #f1f5f9;

  /* Borders */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-glass: #e2e8f0;
  --border-glass-bright: rgba(37, 99, 235, 0.3);

  /* Accent colours */
  --accent-primary: #2563eb;
  --accent-primary-hover: #1d4ed8;
  --accent-blue: #3b82f6;
  --accent-cyan: #0284c7;
  --accent-purple: #7c3aed;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;
  --accent-glow: rgba(37, 99, 235, 0.18);

  /* Typography */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.12);

  /* Spacing & Shape */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

.mono {
  font-family: var(--font-mono);
}

/* App Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ==========================================================================
   SIDEBAR — Premium Enterprise Navigation
   ========================================================================== */
.sidebar {
  width: 272px;
  min-width: 272px;
  background: #ffffff;
  border-right: 1px solid #e8edf5;
  display: flex;
  flex-direction: column;
  padding: 0;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 1px 0 0 0 #e8edf5, 4px 0 24px -6px rgba(15, 23, 42, 0.04);
}

/* ---- Brand Area ---- */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px 20px;
  border-bottom: 1px solid #eef1f6;
  flex-shrink: 0;
  background: #ffffff;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(145deg, #2563eb 0%, #4f46e5 60%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.2),
    0 4px 14px rgba(37, 99, 235, 0.32),
    inset 0 1px 0 rgba(255,255,255,0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand:hover .logo-icon {
  transform: scale(1.06) rotate(-2deg);
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.3),
    0 6px 20px rgba(37, 99, 235, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.18);
}

.brand-text h2 {
  font-size: 0.975rem;
  font-weight: 750;
  color: #0f172a;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-version-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 1px 6px;
  width: fit-content;
}

/* ---- Navigation ---- */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  padding: 12px 10px 8px 10px;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-section-label {
  padding: 16px 10px 5px 10px;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  user-select: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  color: #475569;
  font-weight: 500;
  font-size: 0.84rem;
  letter-spacing: -0.01em;
  line-height: 1.35;
  text-decoration: none;
  border: 1px solid transparent;
  position: relative;
  transition:
    background 0.13s ease,
    color 0.13s ease,
    border-color 0.13s ease,
    box-shadow 0.13s ease;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item .nav-icon {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  stroke: #94a3b8;
  transition: stroke 0.13s ease;
  stroke-width: 1.9;
}

/* Hover state */
.nav-item:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #e2e8f0;
}

.nav-item:hover .nav-icon {
  stroke: #475569;
}

/* Active / selected state */
.nav-item.active {
  background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
  color: #1d4ed8;
  font-weight: 650;
  border-color: #bfdbfe;
  box-shadow:
    inset 3px 0 0 #2563eb,
    0 1px 3px rgba(37, 99, 235, 0.08);
}

.nav-item.active .nav-icon {
  stroke: #2563eb;
}

/* Active left accent bar (pseudo-element alternative) */
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 3px;
  background: linear-gradient(180deg, #2563eb, #4f46e5);
  border-radius: 0 3px 3px 0;
}

/* ---- Sidebar Footer ---- */
.sidebar-footer {
  padding: 12px 10px 16px 10px;
  border-top: 1px solid #eef1f6;
  flex-shrink: 0;
}

.engine-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.08);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  flex-shrink: 0;
  animation: liveRing 2s ease-in-out infinite;
}

@keyframes liveRing {
  0%   { box-shadow: 0 0 0 0   rgba(16, 185, 129, 0.5); }
  50%  { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);   }
  100% { box-shadow: 0 0 0 0   rgba(16, 185, 129, 0);   }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.engine-badge-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.engine-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #065f46;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.engine-sub {
  font-size: 0.68rem;
  font-weight: 500;
  color: #059669;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Main Content */
.main-content {
  flex: 1;
  padding: 32px 40px;
  max-width: 1600px;
  overflow-x: hidden;
}

/* Top Bar */
/* Top Bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
  gap: 20px;
}

.breadcrumb-trail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.breadcrumb-root {
  color: var(--text-muted);
}

.breadcrumb-separator {
  color: var(--text-muted);
  opacity: 0.5;
}

.breadcrumb-current {
  color: #2563eb;
  font-weight: 600;
}

.title-area h1 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 0;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-top: 3px;
}

.actions-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.engine-status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 2s infinite ease-in-out;
}

/* User Menu Dropdown */
.user-menu-wrapper {
  position: relative;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-primary);
}

.user-profile-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-primary);
}

.user-profile-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chevron-icon {
  stroke: var(--text-muted);
  transition: transform 0.2s ease;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 1000;
  animation: dropdownPop 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownPop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-dropdown-header {
  padding: 8px 10px 10px 10px;
}

.dropdown-user-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dropdown-org-name {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.dropdown-role-tag {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 6px 0;
}

.user-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.user-dropdown-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.user-dropdown-item.danger {
  color: var(--accent-rose);
}

.user-dropdown-item.danger:hover {
  background: rgba(244, 63, 94, 0.1);
  color: var(--accent-rose);
}

/* View Panels */
.view-panel {
  display: none;
  flex-direction: column;
  gap: 24px;
}

.view-panel.active {
  display: flex;
  animation: viewFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.badge-cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); border: 1px solid rgba(139, 92, 246, 0.3); }
.badge-amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-rose { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); border: 1px solid rgba(244, 63, 94, 0.3); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 4px 16px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.22);
}

.btn-lg { padding: 14px 24px; font-size: 0.95rem; }
.btn-xs { padding: 4px 8px; font-size: 0.7rem; border-radius: var(--radius-sm); }

/* Hero Banner */
.hero-banner {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.hero-banner h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 8px 0;
}

.hero-banner p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  max-width: 650px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 12px;
}

/* Metric Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.metric-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transform: translateY(-2px);
}

.metric-card:hover::before {
  opacity: 1;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.metric-value {
  font-size: 1.9rem;
  font-weight: 800;
  margin: 8px 0;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.metric-value.purple { color: var(--accent-purple); }
.metric-value.emerald { color: var(--accent-emerald); }
.metric-value.amber { color: var(--accent-amber); }
.metric-value.cyan { color: var(--accent-cyan); }

.metric-footer {
  font-size: 0.75rem;
  font-weight: 600;
}
.metric-footer.success { color: var(--accent-emerald); }
.metric-footer.purple { color: var(--accent-purple); }
.metric-footer.emerald { color: var(--accent-emerald); }
.metric-footer.amber { color: var(--accent-amber); }

/* Content Split Panels */
.content-split {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
}

.panel-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.panel-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  text-align: left;
  padding: 12px 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-elevated);
}

.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.data-table tr:hover td {
  background: var(--bg-card-hover);
}

.empty-state {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Strategy Items */
.strategy-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.strategy-item {
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.strat-head {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.strat-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 700;
}

.strat-badge.cyan { background: #e0f2fe; color: #0369a1; }
.strat-badge.emerald { background: #d1fae5; color: #065f46; }
.strat-badge.purple { background: #ede9fe; color: #5b21b6; }

.strat-desc {
  font-size: 0.775rem;
  color: var(--text-secondary);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

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

.form-input, .form-select, .form-range {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus, .form-select:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-select option {
  background: #ffffff;
  color: var(--text-primary);
}

/* Project Selector Cards */
.project-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.proj-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-light);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.proj-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.proj-card.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25), var(--shadow-sm);
}

.proj-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.proj-card-title-wrap {
  flex: 1;
  min-width: 0;
}

.proj-card-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proj-card.selected .proj-card-title {
  color: #1d4ed8;
}

.proj-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.proj-action-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: #f8fafc;
  cursor: pointer;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  opacity: 0.85;
  transition: all 0.15s ease;
}

.proj-action-btn:hover {
  opacity: 1;
  background: #e2e8f0;
  border-color: #cbd5e1;
  transform: scale(1.08);
}

.proj-action-btn.danger {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #e11d48;
}

.proj-action-btn.danger:hover {
  background: #ffe4e6;
  border-color: #fca5a5;
  color: #be123c;
  transform: scale(1.08);
}

.proj-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}

.proj-card-sub {
  font-size: 0.725rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Tag Pills & Interactive Filter Bar */
.tag-search-input {
  padding: 3px 8px;
  font-size: 0.725rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: var(--bg-input);
  outline: none;
  width: 130px;
  transition: all 0.2s ease;
}

.tag-search-input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.active-tags-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.active-tags-label {
  font-size: 0.675rem;
  font-weight: 700;
  color: #166534;
  letter-spacing: 0.05em;
}

.tag-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #2563eb;
  color: #ffffff;
  font-size: 0.725rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
}

.tag-chip-remove {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 0 2px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.85;
  transition: opacity 0.15s, transform 0.15s;
}

.tag-chip-remove:hover {
  opacity: 1;
  transform: scale(1.2);
}

.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  max-height: 130px;
  overflow-y: auto;
  padding: 2px;
  border-radius: var(--radius-sm);
}

.tag-pill {
  padding: 4px 10px;
  border-radius: 9999px;
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.725rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.tag-pill:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.tag-pill.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

/* Terminal */
.terminal-panel {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  height: 520px;
  background: #0f172a;
  border: 1px solid #1e293b;
}

.terminal-header {
  padding: 12px 16px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #f8fafc;
}

.terminal-body {
  flex: 1;
  padding: 16px;
  background: #090d16;
  color: #cbd5e1;
  font-size: 0.78rem;
  line-height: 1.6;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.panel-card-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.events-scroll-container {
  max-height: 130px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.event-row {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

/* Screenshot Grid */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}

.screenshot-thumb {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-medium);
  cursor: pointer;
  aspect-ratio: 16/9;
  background: #0f172a;
  box-shadow: var(--shadow-sm);
}

.screenshot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Modal */
.btn-icon {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  opacity: 0.7;
  transition: all 0.2s ease;
  line-height: 1;
}

.btn-icon:hover {
  opacity: 1;
  background: rgba(15, 23, 42, 0.06);
  border-color: var(--border-medium);
  transform: scale(1.08);
}

.btn-icon.danger:hover {
  background: rgba(225, 29, 72, 0.1);
  border-color: #fca5a5;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}

.modal-content {
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-primary);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 16px 24px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--bg-card-solid);
  color: var(--text-primary);
}

.modal-body-media {
  background: #090d16;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

/* Global Toast Notification System */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  min-width: 320px;
  max-width: 440px;
  background: var(--bg-card-solid);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-medium);
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  color: var(--text-primary);
}

.toast-item.toast-leave {
  animation: toastSlideOut 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(40px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(40px) scale(0.95); }
}

.toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.toast-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.toast-msg {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.4;
  word-break: break-word;
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s;
}

.toast-close:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.toast-item.toast-success {
  border-left: 4px solid var(--accent-emerald);
}
.toast-item.toast-error {
  border-left: 4px solid var(--accent-rose);
}
.toast-item.toast-warning {
  border-left: 4px solid var(--accent-amber);
}
.toast-item.toast-info {
  border-left: 4px solid var(--accent-primary);
}

/* Custom Confirmation & Alert Dialog */
.dialog-content {
  max-width: 480px !important;
  border-radius: var(--radius-lg);
}

.dialog-body {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.dialog-icon-wrapper {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 6px;
}

.dialog-icon-danger {
  background: #fee2e2;
  color: #dc2626;
  border: 2px solid #fecaca;
}

.dialog-icon-warning {
  background: #fef3c7;
  color: #d97706;
  border: 2px solid #fde68a;
}

.dialog-icon-info {
  background: #e0e7ff;
  color: #4f46e5;
  border: 2px solid #c7d2fe;
}

.dialog-icon-success {
  background: #d1fae5;
  color: #059669;
  border: 2px solid #a7f3d0;
}

.dialog-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.dialog-message {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.dialog-actions {
  display: flex;
  width: 100%;
  gap: 12px;
  margin-top: 14px;
  justify-content: center;
}

.dialog-actions .btn {
  flex: 1;
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 600;
}

.modal-body img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-sm);
}

/* Healing Record Card */
.healing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1.2fr 2fr 1.2fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 12px;
}

.diff-box {
  background: #f8fafc;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.diff-old { color: #e11d48; }
.diff-new { color: #059669; font-weight: 600; }

.notification-banner {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 0.85rem;
}
.notification-banner.success {
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.code-block {
  background: #0f172a;
  padding: 16px;
  border-radius: var(--radius-sm);
  color: #38bdf8;
  font-size: 0.825rem;
  overflow-x: auto;
}

.license-info-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lic-row {
  display: flex;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.lic-lbl {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.lic-val {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.lic-val.purple { color: #7c3aed; }
.lic-val.emerald { color: #059669; }

/* -------------------------------------------------------------------------
   LIVE MIRROR TOOLBAR & CONTROLS
------------------------------------------------------------------------- */
.mirror-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.mirror-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 320px;
  flex-wrap: wrap;
}

.mirror-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  white-space: nowrap;
  margin: 0;
}

.mirror-select {
  flex: 1;
  min-width: 220px;
  max-width: 440px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.mirror-timer {
  font-size: 0.775rem;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  white-space: nowrap;
}

.mirror-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* -------------------------------------------------------------------------
   SCENARIO-BASED SCREENSHOTS
------------------------------------------------------------------------- */
.scenario-screenshots-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.scenario-screenshot-group {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px;
  transition: all 0.2s ease;
}

.scenario-screenshot-group:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.scenario-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.scenario-group-title {
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scenario-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}

.screenshot-thumb-item {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-medium);
  cursor: pointer;
  background: #0f172a;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.screenshot-thumb-item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-color: #2563eb;
}

.screenshot-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.screenshot-thumb-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  font-size: 0.6rem;
  padding: 2px 4px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -------------------------------------------------------------------------
   TEST REPORTS & EXECUTION ANALYTICS STUDIO
------------------------------------------------------------------------- */
.reports-run-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.report-run-card {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-light);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.report-run-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
  background: #fbfdff;
}

.report-run-card.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.report-run-info-col {
  flex: 1.4;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.report-run-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.report-run-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.report-run-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.report-run-progress-col {
  flex: 1.2;
  min-width: 200px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.report-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
}

.report-progress-passed {
  background: #10b981;
  height: 100%;
  transition: width 0.3s ease;
}

.report-progress-failed {
  background: #ef4444;
  height: 100%;
  transition: width 0.3s ease;
}

.report-progress-skipped {
  background: #f59e0b;
  height: 100%;
  transition: width 0.3s ease;
}

.report-run-actions-col {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Detailed Report Viewer */
.report-inspector-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.report-inspector-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.report-status-banner {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.85rem;
}

.report-status-banner.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.report-status-banner.danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.report-status-banner.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.error-triage-panel {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 16px 0;
}

.error-triage-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: #9f1239;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.error-triage-msg {
  font-family: monospace;
  font-size: 0.775rem;
  color: #be123c;
  background: #ffffff;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid #fda4af;
  white-space: pre-wrap;
  word-break: break-all;
}

.scenario-matrix-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.scenario-matrix-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
  transition: all 0.2s ease;
}

.scenario-matrix-card:hover {
  border-color: var(--border-medium);
}

.scenario-matrix-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-elevated);
  cursor: pointer;
  gap: 8px;
  user-select: none;
  transition: background 0.15s ease;
}

.scenario-matrix-header:hover {
  background: var(--bg-card-hover);
}

.scenario-matrix-body {
  padding: 14px 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scenario-steps-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-top: 6px;
}

.scenario-step-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.825rem;
  line-height: 1.45;
}

.badge-step {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.badge-step-given { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.badge-step-when  { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }
.badge-step-then  { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }
.badge-step-and   { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.badge-step-but   { background: #ffe4e6; color: #e11d48; border: 1px solid #fecdd3; }
.badge-step-step  { background: #f3e8ff; color: #9333ea; border: 1px solid #e9d5ff; }

.step-text-content {
  color: var(--text-primary);
  font-family: var(--font-mono, monospace);
  font-size: 0.8rem;
  word-break: break-word;
}

/* Lightbox Modal */
.lightbox-modal-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  border: 1px solid #334155;
}

.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

.lightbox-body {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
  overflow: auto;
}

.lightbox-body img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 4px;
  object-fit: contain;
}

/* AI Healing Studio Cards */
.healing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.healing-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-medium);
}

.healing-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.healing-card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.healing-card-element-name {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.healing-card-meta {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.healing-card-meta strong {
  color: var(--text-primary);
}

.healing-card-diff {
  font-family: var(--font-mono, monospace);
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-light);
  margin-top: 4px;
}

.diff-row-broken {
  background: #fef2f2;
  color: #dc2626;
  padding: 7px 12px;
  border-bottom: 1px solid #fee2e2;
  word-break: break-all;
}

.diff-row-healed {
  background: #f0fdf4;
  color: #16a34a;
  padding: 7px 12px;
  word-break: break-all;
}

/* User Pool Toolbar & Controls */
.user-pool-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--bg-card);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.user-pool-toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  flex: 1;
}

.user-pool-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-label {
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ==========================================================================
   MODAL & DIALOG SYSTEM (OVERLAYS, MODALS, CONFIRMATION DIALOGS)
   ========================================================================== */
.modal-backdrop,
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-dialog,
.modal-content {
  background: #ffffff;
  border-radius: var(--radius-lg, 14px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalScaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
  background: #f8fafc;
  border-top-left-radius: var(--radius-lg, 14px);
  border-top-right-radius: var(--radius-lg, 14px);
}

.modal-header span,
.modal-header h3,
.modal-header #userModalTitle {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
}

.modal-body {
  padding: 24px;
}

.dialog-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
}

.dialog-icon-danger {
  background: #fee2e2;
  color: #dc2626;
}

.dialog-icon-info {
  background: #e0f2fe;
  color: #0284c7;
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  color: var(--text-primary, #0f172a);
  padding: 12px 18px;
  border-radius: var(--radius-md, 10px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(226, 232, 240, 0.9);
  min-width: 280px;
  max-width: 420px;
  animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.25s ease;
}

.toast-item.toast-leave {
  opacity: 0;
  transform: translateX(30px);
}

.toast-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.toast-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.toast-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  margin-bottom: 2px;
}

.toast-msg {
  font-size: 0.8rem;
  color: var(--text-secondary, #475569);
  line-height: 1.35;
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 6px;
  border-radius: 4px;
}
.toast-close:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.toast-success { border-left: 4px solid #10b981; }
.toast-error { border-left: 4px solid #ef4444; }
.toast-warning { border-left: 4px solid #f59e0b; }
.toast-info { border-left: 4px solid #3b82f6; }

/* =========================================================================
   DEDICATED IN-PAGE AUTHENTICATION SCREEN (ZERO POPUPS/MODALS)
   ========================================================================= */

.inpage-login-canvas {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  background-image: radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 45%),
                    radial-gradient(circle at 85% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 45%);
  padding: 40px 24px;
}

.inpage-login-split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  max-width: 1200px;
  width: 100%;
  gap: 64px;
  align-items: center;
}

@media (max-width: 960px) {
  .inpage-login-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Left Showcase Column (BrowserStack AI Testing Style) */
.inpage-hero-column {
  display: flex;
  flex-direction: column;
}

.inpage-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  width: fit-content;
  margin-bottom: 24px;
}

.inpage-brand-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
}

.inpage-brand-text {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1d4ed8;
}

.inpage-hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.gradient-text {
  background: linear-gradient(135deg, #1d4ed8 0%, #6366f1 50%, #0284c7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.inpage-hero-sub {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 520px;
}

.inpage-features-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
}

.inpage-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.feature-check-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.inpage-feature-item div strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.inpage-feature-item div span {
  display: block;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.inpage-telemetry-preview {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  width: fit-content;
}

.telemetry-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-number {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.telemetry-stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border-light);
}

/* Right In-Page Form Card */
.inpage-form-column {
  display: flex;
  justify-content: center;
}

.inpage-form-card {
  width: 100%;
  max-width: 440px;
  min-height: 590px;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  padding: 36px 32px;
  box-sizing: border-box;
  transition: transform 0.2s ease, min-height 0.25s ease;
}

.auth-view-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  animation: authFadeIn 0.2s ease-in-out;
}

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

.auth-trust-badge {
  margin-top: 24px;
  padding: 14px 16px;
  background: rgba(37, 99, 235, 0.04);
  border: 1px dashed rgba(37, 99, 235, 0.22);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-trust-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  flex-shrink: 0;
}

.auth-trust-text {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.auth-trust-text strong {
  display: block;
  font-size: 0.79rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.auth-card-shake {
  animation: authShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes authShake {
  10%, 90% { transform: translateX(-4px); }
  20%, 80% { transform: translateX(6px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(4px); }
}

.inpage-form-header {
  margin-bottom: 24px;
}

.inpage-form-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.inpage-form-header p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.auth-error-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: var(--radius-md);
  color: var(--accent-rose);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 18px;
}

.inpage-auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.inpage-auth-form .form-group {
  margin-bottom: 0;
}

.inpage-auth-form .form-group label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: block;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-input {
  width: 100%;
  padding: 11px 40px 11px 40px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.auth-input:focus {
  background: var(--bg-input-focus);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-eye-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.auth-eye-btn:hover {
  color: var(--text-primary);
}

.btn-auth-submit {
  width: 100%;
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  border-radius: var(--radius-md);
  background: #0070f0;
  border-color: #0070f0;
  color: #ffffff;
  transition: all 0.15s ease;
}

.btn-auth-submit:hover {
  background: #0050b3;
  border-color: #0050b3;
}

/* Quick 1-Click Persona Cards */
.persona-selector-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.persona-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 12px;
}

.persona-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.persona-card-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  color: var(--text-primary);
}

.persona-card-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.persona-badge-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.persona-badge-icon.purple {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.persona-badge-icon.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.persona-badge-icon.emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.persona-card-role {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-primary);
}

.persona-card-sub {
  font-size: 0.62rem;
  color: var(--text-muted);
}

/* Theme switcher removed — single Enterprise Light theme */

.user-avatar-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 5px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.05em;
}


/* ==========================================================================
   GETTING STARTED GUIDE — View Panel Styles
   ========================================================================== */

/* ── Guide top progress header ── */
.guide-progress-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding: 16px 22px;
  background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
}
.guide-progress-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e40af;
  letter-spacing: -0.02em;
}
.guide-progress-subtitle {
  font-size: 0.8rem;
  color: #3b82f6;
  margin-top: 2px;
}
.guide-steps-track {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.guide-step-pip {
  width: 28px;
  height: 6px;
  border-radius: 3px;
  background: #dbeafe;
  transition: background 0.25s ease;
}
.guide-step-pip.done { background: #2563eb; }

/* ── Two-column layout ── */
.guide-layout {
  display: grid;
  grid-template-columns: 216px 1fr;
  gap: 28px;
  align-items: start;
}

/* ── Sticky TOC ── */
.guide-toc {
  position: sticky;
  top: 24px;
  background: #ffffff;
  border: 1px solid #e8edf5;
  border-radius: 12px;
  padding: 14px 10px;
  box-shadow: 0 1px 4px rgba(15,23,42,0.06);
}
.guide-toc-title {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 0 8px 10px 8px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 6px;
}
.guide-toc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 0.77rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.guide-toc-item:hover { background: #f1f5f9; color: #1e293b; }
.guide-toc-item.active { background: #eff6ff; color: #1d4ed8; font-weight: 650; }
.guide-toc-num {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.63rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.12s ease, color 0.12s ease;
}
.guide-toc-item.active .guide-toc-num { background: #2563eb; color: #ffffff; }

/* ── Steps container ── */
.guide-steps { display: flex; flex-direction: column; gap: 24px; }

/* ── Individual step card ── */
.guide-step-card {
  background: #ffffff;
  border: 1px solid #e8edf5;
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: 0 1px 4px rgba(15,23,42,0.05);
  scroll-margin-top: 24px;
  transition: box-shadow 0.2s ease;
}
.guide-step-card:hover { box-shadow: 0 4px 16px rgba(15,23,42,0.08); }

/* ── Step header ── */
.guide-step-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}
.guide-step-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37,99,235,0.28);
}
.guide-step-meta { flex: 1; }
.guide-step-meta h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.guide-step-desc { font-size: 0.83rem; color: #64748b; line-height: 1.5; }
.guide-step-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-top: 4px;
}
.guide-step-tag.required { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.guide-step-tag.optional { background: #f0fdf4; border: 1px solid #bbf7d0; color: #16a34a; }
.guide-step-tag.important { background: #fffbeb; border: 1px solid #fde68a; color: #d97706; }

/* ── Body content ── */
.guide-step-body { display: flex; flex-direction: column; gap: 14px; }
.guide-step-body p { font-size: 0.875rem; color: #374151; line-height: 1.65; margin: 0; }
.guide-step-body ul, .guide-step-body ol { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.guide-step-body li { font-size: 0.875rem; color: #374151; line-height: 1.55; }
.guide-step-body strong { color: #0f172a; font-weight: 650; }
.guide-step-body code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 1px 5px;
  color: #1e40af;
}

/* ── Code block with copy ── */
.guide-code-wrap { position: relative; margin: 4px 0; }
.guide-code-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.guide-code-filename { font-size: 0.72rem; font-weight: 600; color: #94a3b8; font-family: var(--font-mono); }
.guide-code-block {
  background: #0f172a;
  border-radius: 10px;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.79rem;
  line-height: 1.72;
  color: #e2e8f0;
  border: 1px solid #1e293b;
  white-space: pre;
}
.guide-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.guide-copy-btn:hover { background: #334155; color: #e2e8f0; border-color: #475569; }
.guide-copy-btn.copied { background: #052e16; border-color: #166534; color: #86efac; }

/* ── Callouts ── */
.guide-callout {
  display: flex;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 10px;
  font-size: 0.84rem;
  line-height: 1.55;
}
.guide-callout.tip  { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.guide-callout.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.guide-callout.warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.guide-callout-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

/* ── Prereq grid ── */
.guide-prereq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.guide-prereq-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.guide-prereq-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.guide-prereq-icon.java   { background: #fef3c7; }
.guide-prereq-icon.maven  { background: #fce7f3; }
.guide-prereq-icon.chrome { background: #eff6ff; }
.guide-prereq-icon.git    { background: #f0fdf4; }
.guide-prereq-label { font-size: 0.82rem; font-weight: 650; color: #0f172a; }
.guide-prereq-ver   { font-size: 0.72rem; color: #64748b; margin-top: 1px; }

/* ── Directory tree ── */
.guide-dir-tree {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.79rem;
  line-height: 1.85;
  color: #374151;
  white-space: pre;
}

/* ── Dashboard numbered steps ── */
.guide-dashboard-steps { counter-reset: dash-step; display: flex; flex-direction: column; gap: 12px; }
.guide-dashboard-step { display: flex; gap: 14px; align-items: flex-start; }
.guide-dashboard-step::before {
  counter-increment: dash-step;
  content: counter(dash-step);
  width: 26px;
  height: 26px;
  background: #2563eb;
  color: #fff;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.guide-dashboard-step p { margin: 0; }

/* ── Step footer nav ── */
.guide-step-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}
.guide-btn-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}
.guide-btn-next:hover { background: #1d4ed8; transform: translateY(-1px); }
.guide-btn-prev {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.guide-btn-prev:hover { background: #f1f5f9; color: #1e293b; border-color: #cbd5e1; }

/* ── Collapsible Section & Reference Table ── */
.guide-collapsible-wrap {
  margin-top: 10px;
}
.guide-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e40af;
  cursor: pointer;
  transition: all 0.15s ease;
}
.guide-toggle-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.guide-toggle-icon {
  font-size: 0.7rem;
  color: #3b82f6;
  transition: transform 0.2s ease;
}
.guide-collapsible-panel {
  margin-top: 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}
.guide-ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.guide-ref-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}
.guide-ref-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: top;
}
.guide-ref-table tr:last-child td {
  border-bottom: none;
}
.guide-ref-table code {
  color: #0369a1;
  gap: 5px;
  padding: 4px 10px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.guide-copy-btn:hover { background: #334155; color: #e2e8f0; border-color: #475569; }
.guide-copy-btn.copied { background: #052e16; border-color: #166534; color: #86efac; }

/* ── Callouts ── */
.guide-callout {
  display: flex;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 10px;
  font-size: 0.84rem;
  line-height: 1.55;
}
.guide-callout.tip  { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.guide-callout.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.guide-callout.warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.guide-callout-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

/* ── Prereq grid ── */
.guide-prereq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.guide-prereq-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.guide-prereq-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.guide-prereq-icon.java   { background: #fef3c7; }
.guide-prereq-icon.maven  { background: #fce7f3; }
.guide-prereq-icon.chrome { background: #eff6ff; }
.guide-prereq-icon.git    { background: #f0fdf4; }
.guide-prereq-label { font-size: 0.82rem; font-weight: 650; color: #0f172a; }
.guide-prereq-ver   { font-size: 0.72rem; color: #64748b; margin-top: 1px; }

/* ── Directory tree ── */
.guide-dir-tree {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.79rem;
  line-height: 1.85;
  color: #374151;
  white-space: pre;
}

/* ── Dashboard numbered steps ── */
.guide-dashboard-steps { counter-reset: dash-step; display: flex; flex-direction: column; gap: 12px; }
.guide-dashboard-step { display: flex; gap: 14px; align-items: flex-start; }
.guide-dashboard-step::before {
  counter-increment: dash-step;
  content: counter(dash-step);
  width: 26px;
  height: 26px;
  background: #2563eb;
  color: #fff;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.guide-dashboard-step p { margin: 0; }

/* ── Step footer nav ── */
.guide-step-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}
.guide-btn-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}
.guide-btn-next:hover { background: #1d4ed8; transform: translateY(-1px); }
.guide-btn-prev {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.guide-btn-prev:hover { background: #f1f5f9; color: #1e293b; border-color: #cbd5e1; }

/* ── Collapsible Section & Reference Table ── */
.guide-collapsible-wrap {
  margin-top: 10px;
}
.guide-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e40af;
  cursor: pointer;
  transition: all 0.15s ease;
}
.guide-toggle-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.guide-toggle-icon {
  font-size: 0.7rem;
  color: #3b82f6;
  transition: transform 0.2s ease;
}
.guide-collapsible-panel {
  margin-top: 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}
.guide-ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.guide-ref-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}
.guide-ref-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: top;
}
.guide-ref-table tr:last-child td {
  border-bottom: none;
}
.guide-ref-table code {
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #e0f2fe;
}

/* ==========================================================================
   COMMERCIAL LICENSE GENERATOR MODAL — Enterprise Light Theme (Matching Application)
   ========================================================================== */
#licenseGenerateModal.modal-overlay {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
}

#licenseGenerateModal .modal-content {
  background: #ffffff;
  color: var(--text-primary, #0f172a);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: var(--radius-lg, 14px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
}

#licenseGenerateModal .modal-header {
  background: #f8fafc;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
  color: var(--text-primary, #0f172a);
  border-top-left-radius: var(--radius-lg, 14px);
  border-top-right-radius: var(--radius-lg, 14px);
  padding: 18px 24px;
}

#licenseGenerateModal .modal-header h3 {
  color: var(--text-primary, #0f172a);
  font-size: 1.05rem;
  font-weight: 700;
}

#licenseGenerateModal .modal-body {
  background: #ffffff;
  color: var(--text-primary, #0f172a);
  padding: 24px;
}

#licenseGenerateModal form {
  background: transparent;
}

#licenseGenerateModal label {
  color: var(--text-secondary, #475569);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

#licenseGenerateModal .form-input,
#licenseGenerateModal .form-select {
  background: #f8fafc;
  border: 1px solid var(--border-medium, #cbd5e1);
  color: var(--text-primary, #0f172a);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
}

#licenseGenerateModal .form-input:focus,
#licenseGenerateModal .form-select:focus {
  background: #ffffff;
  border-color: var(--accent-primary, #2563eb);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

#licenseGenerateModal .form-select option {
  background: #ffffff;
  color: #0f172a;
}

#licenseGenerateModal .btn-outline {
  border: 1px solid #cbd5e1;
  color: #475569;
  background: transparent;
  padding: 9px 18px;
  font-weight: 600;
  border-radius: 8px;
}

#licenseGenerateModal .btn-outline:hover {
  background: #f1f5f9;
  color: #0f172a;
}

#licenseGenerateModal .btn-primary {
  background: #2563eb;
  color: #ffffff;
  border: none;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

#licenseGenerateModal .btn-primary:hover {
  background: #1d4ed8;
}

/* ========================================================================= */
/* MODERNIZED REPORTS & EXECUTION ANALYTICS STUDIO STYLES */
/* ========================================================================= */

/* Search bar */
.report-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  width: 100%;
}
.report-search-input {
  width: 100%;
  padding: 8px 30px 8px 32px;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  font-size: 0.8rem;
  color: var(--text-primary, #0f172a);
  transition: all 0.2s ease;
}
.report-search-input:focus {
  outline: none;
  border-color: var(--accent-primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.report-search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted, #94a3b8);
  display: inline-flex;
  align-items: center;
  pointer-events: none;
}
.report-search-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 0.85rem;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.report-search-clear:hover {
  color: var(--text-primary, #0f172a);
  background: var(--bg-hover, #f1f5f9);
}

.report-search-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
  margin-bottom: 8px;
  padding: 0 2px;
}

/* Pagination Bar */
.report-pagination-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  margin-top: 10px;
  border-top: 1px solid var(--border-light, #e2e8f0);
  font-size: 0.75rem;
  color: var(--text-secondary, #475569);
  flex-wrap: wrap;
  gap: 8px;
}
.report-pagination-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.report-page-btn {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  color: var(--text-primary, #0f172a);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.725rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.report-page-btn:hover:not(:disabled) {
  background: var(--bg-hover, #f1f5f9);
  border-color: #cbd5e1;
}
.report-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.report-page-indicator {
  font-weight: 600;
  padding: 0 6px;
  color: var(--text-primary, #0f172a);
}
.report-page-size-select {
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid var(--border-light, #e2e8f0);
  background: var(--bg-surface, #ffffff);
  font-size: 0.725rem;
  color: var(--text-primary, #0f172a);
  outline: none;
}

/* Step Status Badges & Layout */
.scenario-step-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.825rem;
  line-height: 1.45;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.scenario-step-row:hover {
  background: rgba(241, 245, 249, 0.6);
}
.scenario-step-row.step-row-failed {
  background: #fff1f2;
  border-left: 3px solid #ef4444;
}
.scenario-step-row.step-row-passed {
  border-left: 3px solid #10b981;
}
.scenario-step-row.step-row-skipped {
  opacity: 0.75;
  border-left: 3px solid #94a3b8;
}
.badge-step-status {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.badge-step-status-passed {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.badge-step-status-failed {
  background: #ffe4e6;
  color: #9f1239;
  border: 1px solid #fecdd3;
  font-weight: 900;
}
.badge-step-status-skipped {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.badge-step-status-running {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  animation: pulse 1.5s infinite;
}

/* Step Failure Callout Box */
.step-failure-callout {
  margin: 6px 0 10px 16px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.08);
}
.step-failure-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.775rem;
  font-weight: 700;
  color: #991b1b;
  margin-bottom: 4px;
}
.step-failure-detail {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  color: #7f1d1d;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.4;
  background: #fff5f5;
  padding: 8px 10px;
  border-radius: 4px;
  margin-top: 4px;
}

/* Full-Page Report View Layout */
.report-fullpage-wrap {
  padding: 0;
  max-width: 100%;
}
.report-fullpage-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: var(--radius-lg, 12px);
  padding: 16px 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.report-fullpage-nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.report-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-light, #e2e8f0);
  background: var(--bg-surface, #ffffff);
  color: var(--text-primary, #0f172a);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.report-back-btn:hover {
  background: var(--bg-hover, #f1f5f9);
  border-color: #cbd5e1;
}
.report-fullpage-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.scenario-search-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.scenario-filter-pills {
  display: inline-flex;
  gap: 4px;
  background: var(--bg-card, #f8fafc);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-light, #e2e8f0);
}
.scenario-filter-pill {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-secondary, #475569);
  cursor: pointer;
  transition: all 0.15s ease;
}
.scenario-filter-pill.active {
  background: var(--bg-surface, #ffffff);
  color: var(--text-primary, #0f172a);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.report-terminal-logs {
  background: #0f172a;
  color: #f8fafc;
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  padding: 14px;
  border-radius: var(--radius-md, 8px);
  max-height: 400px;
  overflow-y: auto;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

