/* ==========================================================================
   DeployHub Modern Dark Design System & Aesthetics
   ========================================================================== */

:root {
  --bg-primary: #0a0d14;
  --bg-secondary: #10141f;
  --bg-surface: rgba(22, 28, 45, 0.65);
  --bg-surface-hover: rgba(30, 38, 60, 0.85);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;

  --glass-bg: rgba(16, 20, 31, 0.75);
  --glass-border: 1px solid rgba(255, 255, 255, 0.07);
  --glass-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Background ambient glows */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */
.sidebar {
  width: 260px;
  background-color: var(--bg-secondary);
  border-right: var(--glass-border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  flex-shrink: 0;
  z-index: 100;
}

.brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: var(--glass-border);
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: #0f172a;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-text h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.nav-menu {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  text-align: left;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  transition: var(--transition);
}

.nav-item:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-main);
}

.nav-item:hover svg {
  color: var(--text-main);
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
  font-weight: 600;
}

.nav-item.active svg {
  color: var(--accent-primary);
}

.nav-item .badge {
  margin-left: auto;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.nav-item.active .badge {
  background-color: rgba(99, 102, 241, 0.2);
  color: var(--accent-primary);
}

.sidebar-footer {
  padding: 18px 20px;
  border-top: var(--glass-border);
}

.system-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pulse {
  width: 10px;
  height: 10px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.status-info {
  display: flex;
  flex-direction: column;
}

.status-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.status-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.main-content {
  flex-grow: 1;
  padding: 24px 32px;
  overflow-y: auto;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.header-search {
  position: relative;
  width: 380px;
}

.header-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-dim);
}

.header-search input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  background-color: var(--bg-secondary);
  border: var(--glass-border);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
}

.header-search input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: var(--glass-border);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* Glass Panels */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 24px;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Tab Management */
.tab-content {
  display: none;
  animation: fadeIn 0.25s ease;
}

.tab-content.active {
  display: block;
}

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

/* ==========================================================================
   Metrics Grid
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.metric-card {
  display: flex;
  flex-direction: column;
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.metric-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.metric-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.icon-purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.icon-green { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }

.metric-icon svg {
  width: 20px;
  height: 20px;
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 4px;
}

.metric-footer {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.activity-card {
  padding: 20px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

/* ==========================================================================
   Data Table
   ========================================================================== */
.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.data-table th {
  padding: 12px 16px;
  color: var(--text-dim);
  font-weight: 600;
  border-bottom: var(--glass-border);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

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

.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-failed { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); border: 1px solid rgba(244, 63, 94, 0.3); }
.badge-running { background: rgba(99, 102, 241, 0.15); color: var(--accent-primary); border: 1px solid rgba(99, 102, 241, 0.3); animation: pulse-glow 1.5s infinite; }
.badge-pending { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-outline { background: transparent; border: 1px solid var(--border-color); color: var(--text-muted); }

/* Stages Progression Pill */
.stage-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stage-pill {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stage-pill.active {
  background: var(--accent-primary);
  color: #fff;
  font-weight: 600;
}

.stage-pill.passed {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
}

.stage-pill.failed {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
}

/* ==========================================================================
   Repositories Grid & Details
   ========================================================================== */
.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.repo-card {
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.repo-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.repo-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.repo-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.repo-card-info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.repo-card-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.repo-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-dim);
  border-top: var(--glass-border);
  padding-top: 14px;
  margin-top: 14px;
}

/* Repo Detail View */
.repo-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.repo-detail-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clone-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 8px 4px 12px;
  border-radius: var(--radius-md);
  border: var(--glass-border);
}

.clone-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
}

.clone-box input {
  background: transparent;
  border: none;
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  width: 320px;
  outline: none;
}

.clone-proto-btn {
  padding: 2px 8px !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
  border-radius: 4px !important;
}

.clone-proto-btn.active {
  background: var(--accent-primary) !important;
  color: #fff !important;
}

/* Sub-tabs */
.sub-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: var(--glass-border);
  padding-bottom: 8px;
}

.sub-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.sub-tab:hover {
  color: var(--text-main);
}

.sub-tab.active {
  background: var(--bg-surface);
  color: var(--accent-primary);
  font-weight: 600;
}

.sub-tab-content {
  display: none;
}

.sub-tab-content.active {
  display: block;
}

/* File Explorer */
.file-explorer {
  padding: 0;
  overflow: hidden;
}

.explorer-header {
  padding: 12px 20px;
  border-bottom: var(--glass-border);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  font-size: 0.875rem;
  transition: var(--transition);
}

.file-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.file-item svg {
  width: 16px;
  height: 16px;
  color: var(--accent-primary);
}

.file-viewer {
  margin-top: 16px;
  padding: 0;
  overflow: hidden;
}

.viewer-header {
  padding: 12px 20px;
  border-bottom: var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}

.file-viewer pre {
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: #e2e8f0;
}

/* ==========================================================================
   Runner Cards Grid
   ========================================================================== */
.runners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.runner-card {
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.runner-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.runner-id {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.runner-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.runner-tag {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.25);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.runner-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: var(--glass-border);
  padding-top: 12px;
}

/* ==========================================================================
   Live Terminal Modal
   ========================================================================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  width: 90%;
  max-width: 540px;
  z-index: 1001;
  animation: modalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-lg {
  max-width: 900px;
}

.modal-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: var(--glass-border);
  padding-right: 40px;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

.modal-close-btn:hover {
  background: rgba(244, 63, 94, 0.2);
  color: #fff;
  border-color: rgba(244, 63, 94, 0.4);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.terminal-modal {
  padding: 0;
  overflow: hidden;
  background-color: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.terminal-header {
  background: #161b22;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-red { background: #ff5f56; cursor: pointer; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-modal .modal-close-btn {
  top: 9px;
  right: 14px;
}

.terminal-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.terminal-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 38px;
}

.toggle-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-dim);
  cursor: pointer;
}

.terminal-body {
  height: 480px;
  overflow-y: auto;
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: #e6edf3;
  background-color: #0b0f19;
}

.terminal-line {
  white-space: pre-wrap;
  word-break: break-all;
}

.terminal-line.stderr {
  color: #f87171;
}

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

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

.form-group input, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background-color: rgba(0, 0, 0, 0.4);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.code-editor {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   GitLab / GitHub Style Empty Repository Onboarding Guide
   ========================================================================== */
.empty-repo-guide {
  padding: 24px;
  animation: fadeIn 0.3s ease;
}

.guide-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.guide-banner-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.guide-banner-text h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.guide-banner-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 20px;
}

.guide-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
}

.guide-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.guide-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.guide-card-header h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-code-box {
  position: relative;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  overflow-x: auto;
}

.guide-code-box pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: #38bdf8;
}

.btn-copy-code {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.72rem;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-copy-code:hover {
  background: var(--accent-primary);
  color: #fff;
}

/* ==========================================================================
   Login Screen & Authentication
   ========================================================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #090d16;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.12), transparent 40%);
  pointer-events: none;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-brand-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.login-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.login-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.login-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  margin-bottom: 20px;
}

.login-alert.error {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fda4af;
}

.login-alert svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon svg {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  pointer-events: none;
}

.input-with-icon input {
  padding-left: 40px !important;
  padding-right: 40px !important;
}

.btn-toggle-pwd {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-toggle-pwd:hover {
  color: var(--text-main);
}

.btn-toggle-pwd svg {
  position: static;
  width: 16px;
  height: 16px;
}

.btn-login {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  margin-top: 10px;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.login-footer code {
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* User Profile Menu (Top Header) */
.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 6px 4px 10px;
  border-radius: var(--radius-full);
  margin-left: 8px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), #a855f7);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-info-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

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

.user-role {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.btn-icon-logout {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon-logout:hover {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

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

/* ==========================================================================
   Members & Access Management Styles
   ========================================================================== */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.member-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: var(--glass-border);
  transition: var(--transition);
  position: relative;
}

.member-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.member-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.member-card-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), #a855f7);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.member-card-info {
  flex-grow: 1;
  overflow: hidden;
}

.member-card-info h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-card-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-card-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

.role-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

.role-badge.admin {
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
}

.role-badge.developer, .role-badge.maintainer {
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

.role-badge.viewer {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}

.form-select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

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

/* ==========================================================================
   Pipeline Stop & Restart Controls + Log Error Highlights
   ========================================================================== */
.btn-terminal-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}

.btn-danger-ghost {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fda4af;
}

.btn-danger-ghost:hover {
  background: rgba(244, 63, 94, 0.3);
  border-color: #f43f5e;
  color: #fff;
}

.btn-restart-ghost {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
}

.btn-restart-ghost:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: #818cf8;
  color: #fff;
}

.terminal-line.error-highlight {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.1);
  border-left: 3px solid #f43f5e;
  padding-left: 6px;
  margin: 2px 0;
  font-weight: 600;
}

.terminal-line.system-highlight {
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.08);
  border-left: 3px solid #06b6d4;
  padding-left: 6px;
  margin: 4px 0;
  font-weight: 600;
}


