/* ===== AutoApply Dashboard — Clean Professional Design ===== */

:root {
  --bg-primary: #0f1117;
  --bg-secondary: #161921;
  --bg-card: rgba(22, 25, 33, 0.95);
  --bg-card-hover: rgba(30, 34, 45, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.02);
  --border: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(130, 140, 160, 0.5);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.08);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.08);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.08);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.08);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.35);
  --transition: 0.15s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ===== Light Theme ===== */

[data-theme="light"] {
  --bg-primary: #f5f7fa;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: rgba(245, 247, 250, 0.95);
  --bg-glass: rgba(0, 0, 0, 0.01);
  --border: rgba(0, 0, 0, 0.1);
  --border-focus: rgba(99, 102, 241, 0.5);
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #6366f1;
  --accent-light: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.1);
  --success: #16a34a;
  --success-bg: rgba(22, 163, 74, 0.08);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.08);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.08);
  --info: #2563eb;
  --info-bg: rgba(37, 99, 235, 0.08);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.1);
}

/* Light-theme overrides for hardcoded rgba values */
[data-theme="light"] .nav-item:hover { background: rgba(0, 0, 0, 0.04); }
[data-theme="light"] .nav-item.active { background: rgba(99, 102, 241, 0.08); }
[data-theme="light"] thead th { background: rgba(0, 0, 0, 0.03); }
[data-theme="light"] tbody tr { border-bottom-color: rgba(0, 0, 0, 0.04); }
[data-theme="light"] tbody tr:hover { background: rgba(0, 0, 0, 0.02); }
[data-theme="light"] .card:hover { border-color: rgba(0, 0, 0, 0.15); }
[data-theme="light"] .stat-card:hover { border-color: rgba(0, 0, 0, 0.15); }
[data-theme="light"] .job-card:hover { border-color: rgba(0, 0, 0, 0.15); }
[data-theme="light"] .run-card:hover { border-color: rgba(0, 0, 0, 0.15); }
[data-theme="light"] .portal-card:hover { border-color: rgba(0, 0, 0, 0.15); }
[data-theme="light"] .progress-bar { background: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .modal-overlay { background: rgba(0, 0, 0, 0.3); }
[data-theme="light"] .modal-close { background: rgba(0, 0, 0, 0.04); }
[data-theme="light"] .modal-close:hover { background: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .form-group select,
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea { background: rgba(0, 0, 0, 0.03); }
[data-theme="light"] .profile-grid input,
[data-theme="light"] .profile-grid select { background: rgba(0, 0, 0, 0.03); }
[data-theme="light"] .outcome-select { background: rgba(0, 0, 0, 0.03); }
[data-theme="light"] .btn-secondary { background: rgba(0, 0, 0, 0.04); color: var(--text-secondary); }
[data-theme="light"] .btn-secondary:hover { background: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .wizard-step .step-num,
[data-theme="light"] .wizard-step .step-number { background: rgba(0, 0, 0, 0.04); }
[data-theme="light"] .portal-icon { background: rgba(0, 0, 0, 0.04); }
[data-theme="light"] .portal-stat { background: rgba(0, 0, 0, 0.03); }
[data-theme="light"] .live-feed { background: rgba(0, 0, 0, 0.02); }
[data-theme="light"] .feed-entry { border-bottom-color: rgba(0, 0, 0, 0.04); }
[data-theme="light"] .dropzone:hover,
[data-theme="light"] .dropzone.dragover { background: rgba(0, 0, 0, 0.02); }
[data-theme="light"] .validation-row { border-bottom-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .tooltip::after { background: #ffffff; color: var(--text-primary); box-shadow: var(--shadow); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.12); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.2); }
[data-theme="light"] .badge-tailored { background: rgba(139, 92, 246, 0.08); color: #7c3aed; }
[data-theme="light"] .badge-running,
[data-theme="light"] .badge-submitting { background: rgba(99, 102, 241, 0.08); color: var(--accent); }
[data-theme="light"] .badge-read { background: rgba(14, 165, 233, 0.08); color: #0284c7; }
[data-theme="light"] .badge-offer { background: rgba(16, 185, 129, 0.1); color: #059669; }
[data-theme="light"] .feed-entry .phase-tag.p2 { color: #7c3aed; }

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  margin: 4px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: none;
  width: calc(100% - 20px);
  text-align: left;
  font-family: var(--font);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

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

.theme-toggle .icon {
  font-size: 1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }

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

/* ===== Layout ===== */

.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* ===== Sidebar ===== */

.sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  z-index: 100;
}

.sidebar-brand {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.sidebar-brand h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.sidebar-brand p {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.sidebar-nav {
  flex: 1;
  padding: 4px 10px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

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

.nav-item .icon {
  font-size: 1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.nav-section {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 14px 14px 6px;
}

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.sidebar-footer .status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 8px;
}

.sidebar-footer span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== Main Content ===== */

.main-content {
  grid-column: 2;
  padding: 28px 36px;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
}

.page-header {
  margin-bottom: 28px;
}

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

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

/* ===== Cards ===== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color var(--transition);
  overflow: hidden;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

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

.card-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Stat Cards ===== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color var(--transition);
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.stat-card .stat-icon {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text-primary);
}

.stat-card .stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card .stat-change {
  font-size: 0.72rem;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-card .stat-change.up { color: var(--success); }
.stat-card .stat-change.down { color: var(--danger); }

/* ===== Tables ===== */

.table-container {
  overflow-x: auto;
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  table-layout: auto;
}

thead th {
  text-align: left;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background var(--transition);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

tbody td {
  padding: 10px 14px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
  word-break: keep-all;
}

tbody td:first-child { color: var(--text-primary); }

/* ===== Status Badges ===== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-submitted { background: var(--success-bg); color: var(--success); }
.badge-failed { background: var(--danger-bg); color: var(--danger); }
.badge-skipped { background: var(--warning-bg); color: var(--warning); }
.badge-pending { background: var(--info-bg); color: var(--info); }
.badge-tailored { background: rgba(139, 92, 246, 0.08); color: #a78bfa; }
.badge-running { background: rgba(99, 102, 241, 0.08); color: var(--accent-light); }
.badge-completed { background: var(--success-bg); color: var(--success); }
.badge-read { background: rgba(56, 189, 248, 0.08); color: #38bdf8; }
.badge-read_failed { background: var(--danger-bg); color: var(--danger); }
.badge-tailor_failed { background: var(--danger-bg); color: var(--danger); }
.badge-render_failed { background: var(--danger-bg); color: var(--danger); }
.badge-submitting { background: rgba(99, 102, 241, 0.08); color: var(--accent-light); }
.badge-already_applied { background: var(--warning-bg); color: var(--warning); }
.badge-captcha { background: var(--warning-bg); color: var(--warning); }
.badge-no_response { background: var(--info-bg); color: var(--info); }
.badge-interview { background: var(--success-bg); color: var(--success); }
.badge-rejected { background: var(--danger-bg); color: var(--danger); }
.badge-offer { background: rgba(16, 185, 129, 0.12); color: #34d399; }

/* ===== Buttons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-light);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* ===== Charts ===== */

.chart-container {
  position: relative;
  height: 260px;
  margin: 14px 0;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 200px;
  padding: 0 16px 0 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.bar {
  width: 100%;
  max-width: 52px;
  border-radius: 6px 6px 0 0;
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 3px;
  position: relative;
}

.bar:hover { filter: brightness(1.2); transform: scaleX(1.05); }

.bar-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-top: 8px;
}

.bar-value {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 700;
}

/* Horizontal bar chart */
.hbar-chart {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 0;
}

.hbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hbar-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  min-width: 90px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hbar-track {
  flex: 1;
  height: 28px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.hbar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 2px;
  display: flex;
  align-items: center;
  padding-left: 10px;
}

.hbar-fill-text {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.hbar-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 32px;
  text-align: right;
}

.donut-chart {
  width: 160px;
  height: 160px;
  margin: 0 auto;
}

.donut-chart svg { transform: rotate(-90deg); }

.donut-center {
  text-align: center;
  margin-top: -105px;
  margin-bottom: 40px;
}

.donut-center .value { font-size: 1.75rem; font-weight: 700; }
.donut-center .label { font-size: 0.7rem; color: var(--text-muted); }

.chart-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

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

/* Status breakdown list for dashboard */
.status-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.status-row .name {
  font-size: 0.82rem;
  color: var(--text-secondary);
  flex: 1;
}

.status-row .count {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 28px;
  text-align: right;
}

.status-row .pct {
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 40px;
  text-align: right;
}

.status-row .track {
  flex: 2;
  height: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  overflow: hidden;
}

.status-row .fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Grid Layouts ===== */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* ===== Job Cards ===== */

.job-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color var(--transition);
  cursor: pointer;
}

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

.job-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 10px;
  overflow: hidden;
}

.job-card-header > div:first-child {
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

.job-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-card-company {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-card-meta {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.job-card-meta span {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

/* ===== Progress bar ===== */

.progress-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 100px;
  overflow: hidden;
  display: flex;
}

.progress-segment {
  height: 100%;
  transition: width 0.5s ease;
}

.progress-segment.success { background: var(--success); }
.progress-segment.danger { background: var(--danger); }
.progress-segment.warning { background: var(--warning); }
.progress-segment.info { background: var(--info); }
.progress-segment.purple { background: #a78bfa; }

/* ===== Run Card ===== */

.run-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color var(--transition);
  cursor: pointer;
}

.run-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

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

.run-id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.run-card-stats {
  display: flex;
  gap: 20px;
  margin: 14px 0;
}

.run-stat { text-align: center; }
.run-stat .value { font-size: 1.2rem; font-weight: 700; }
.run-stat .label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== Modal ===== */

.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 90%;
  max-width: 580px;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: var(--shadow-lg);
  transform: scale(0.97);
  transition: transform 0.15s;
  word-break: break-word;
}

.modal-overlay.active .modal { transform: scale(1); }

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

.modal-header h3 { font-size: 1.1rem; font-weight: 700; }

.modal-close {
  width: 30px; height: 30px;
  border-radius: 6px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
}

.modal-close:hover { background: rgba(255, 255, 255, 0.08); color: var(--text-primary); }

/* ===== Form Inputs ===== */

.form-group { margin-bottom: 14px; }

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

.form-group select,
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.85rem;
  transition: border var(--transition);
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}

.form-group textarea { min-height: 72px; resize: vertical; }

/* ===== Empty state ===== */

.empty-state {
  text-align: center;
  padding: 50px 20px;
}

.empty-state .icon { font-size: 2.5rem; margin-bottom: 14px; opacity: 0.4; }
.empty-state h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.empty-state p { color: var(--text-muted); font-size: 0.85rem; max-width: 360px; margin: 0 auto; }

/* ===== Loading ===== */

.loading-spinner { display: flex; justify-content: center; padding: 36px; }

.spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ===== Responsive Desktop ===== */

@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { grid-column: 1; padding: 20px 16px; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ===== Portal Grid ===== */

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.portal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color var(--transition);
}

.portal-card:hover { border-color: rgba(255, 255, 255, 0.1); }

.portal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.portal-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.portal-name { font-weight: 600; font-size: 0.95rem; }

.portal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.portal-stat {
  text-align: center;
  padding: 7px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-sm);
}

.portal-stat .value { font-size: 1rem; font-weight: 700; }
.portal-stat .label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ===== Animations ===== */

.fade-in { animation: fadeIn 0.2s ease-out; }

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

/* ===== Timeline ===== */

.timeline { padding-left: 20px; border-left: 2px solid var(--border); }

.timeline-item { position: relative; padding: 0 0 20px 18px; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -27px; top: 3px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--text-muted);
}

.timeline-item.success::before { border-color: var(--success); }
.timeline-item.failed::before { border-color: var(--danger); }
.timeline-item .time { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 3px; }
.timeline-item .description { font-size: 0.85rem; color: var(--text-secondary); }

/* ===== Scrollbar ===== */

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.14); }

/* ===== Toast ===== */

.toast-container {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.85rem;
  box-shadow: var(--shadow);
  animation: slideInRight 0.2s ease-out;
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }

/* ===== Outcome Select ===== */

.outcome-select {
  padding: 3px 7px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-family: var(--font);
  cursor: pointer;
}

.outcome-select:focus { outline: none; border-color: var(--border-focus); }

/* ===== File Dropzone ===== */

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 36px 18px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-glass);
  position: relative;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
}

.dropzone.has-file {
  border-color: var(--success);
  border-style: solid;
  background: var(--success-bg);
}

.dropzone .dz-icon, .dropzone .dropzone-icon { font-size: 2rem; margin-bottom: 10px; opacity: 0.4; }
.dropzone.has-file .dz-icon, .dropzone.has-file .dropzone-icon { opacity: 0.8; }
.dropzone .dz-label, .dropzone .dropzone-label { font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; }
.dropzone .dz-hint, .dropzone .dropzone-hint { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.dropzone .dz-filename {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-primary);
  margin-top: 8px;
  font-weight: 600;
  word-break: break-all;
}
.dropzone .dropzone-file {
  display: none;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--success);
  font-weight: 600;
  word-break: break-all;
}
.dropzone.has-file .dropzone-file { display: block; }

.dropzone input[type="file"] {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}

/* ===== Wizard Stepper ===== */

.wizard-steps {
  display: flex;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.wizard-step {
  flex: 1;
  padding: 14px 16px;
  text-align: center;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}

.wizard-step:hover { color: var(--text-secondary); }
.wizard-step.active { border-bottom-color: var(--accent); color: var(--text-primary); }
.wizard-step.completed { border-bottom-color: var(--success); color: var(--success); }

.wizard-step .step-num,
.wizard-step .step-number {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.wizard-step.active .step-num,
.wizard-step.active .step-number {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.wizard-step.completed .step-num,
.wizard-step.completed .step-number {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.wizard-step .step-label { font-size: 0.82rem; }
.wizard-content { padding: 0; }

/* ===== Phase Indicator ===== */

.phase-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 22px;
  padding: 16px 0;
}

.phase-node {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text-muted);
  transition: all 0.3s;
  position: relative;
}

.phase-node .phase-label {
  font-size: 0.58rem;
  font-weight: 500;
  position: absolute;
  bottom: -18px;
  white-space: nowrap;
  color: var(--text-muted);
}

.phase-node.active {
  border-color: var(--accent);
  color: var(--accent-light);
}

.phase-node.active .phase-label { color: var(--accent-light); }

.phase-node.completed {
  border-color: var(--success);
  background: var(--success-bg);
  color: var(--success);
}

.phase-node.completed .phase-label { color: var(--success); }

.phase-node.failed {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

.phase-connector {
  width: 70px; height: 2px;
  background: var(--border);
  transition: background 0.3s;
}

.phase-connector.completed { background: var(--success); }
.phase-connector.active { background: var(--accent); }

/* ===== Live Feed ===== */

.live-feed {
  max-height: 320px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border: 1px solid var(--border);
}

.feed-entry {
  padding: 5px 0;
  display: flex;
  gap: 10px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.02);
  align-items: baseline;
}

.feed-entry:last-child { border-bottom: none; }
.feed-entry .time { color: var(--text-muted); white-space: nowrap; min-width: 70px; font-size: 0.72rem; }
.feed-entry .phase-tag {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.feed-entry .phase-tag.p1 { background: rgba(59,130,246,0.1); color: var(--info); }
.feed-entry .phase-tag.p2 { background: rgba(139,92,246,0.1); color: #a78bfa; }
.feed-entry .phase-tag.p3 { background: rgba(34,197,94,0.1); color: var(--success); }
.feed-entry.error { color: var(--danger); }
.feed-entry.success { color: var(--success); }

.feed-time { color: var(--text-muted); white-space: nowrap; min-width: 70px; font-size: 0.72rem; }
.feed-phase {
  font-size: 0.62rem;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.feed-icon { width: 14px; text-align: center; color: var(--text-muted); flex-shrink: 0; }
.feed-message { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.feed-counter { color: var(--text-muted); font-size: 0.72rem; white-space: nowrap; flex-shrink: 0; }

.live-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--success);
}

.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: livePulse 1.5s ease-in-out infinite;
}

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

/* ===== Big Start Button ===== */

.btn-start {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 28px;
  font-size: 1rem;
  font-weight: 700;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}

.btn-start:hover { background: var(--accent-light); }

.btn-start:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== Validation Preview ===== */

.validation-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 14px;
}

.validation-preview h4 { font-size: 0.82rem; font-weight: 600; margin-bottom: 10px; }

.validation-preview .v-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 0.82rem;
  gap: 10px;
}

.validation-preview .v-row .v-label { color: var(--text-muted); flex-shrink: 0; }
.validation-preview .v-row .v-value {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.validation-preview .v-row .v-value.success { color: var(--success); }
.validation-preview .v-row .v-value.warning { color: var(--warning); }

.validation-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  gap: 10px;
}
.validation-row:last-child { border-bottom: none; }
.validation-label { color: var(--text-muted); flex-shrink: 0; }
.validation-value {
  color: var(--text-primary);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== Profile Form ===== */

.profile-form { display: grid; gap: 18px; }

.profile-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.profile-section h4 {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.profile-grid .form-group { margin-bottom: 0; }

.profile-grid label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.profile-grid input,
.profile-grid select {
  width: 100%;
  padding: 7px 10px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.82rem;
  transition: border var(--transition);
}

.profile-grid input:focus,
.profile-grid select:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* ===== Review Summary ===== */

.review-summary { display: grid; gap: 14px; }

.review-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}

.review-card-icon { font-size: 1.6rem; margin-bottom: 6px; }
.review-card-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.review-card-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}
.review-card-detail {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* ===== Complete Banner ===== */

.complete-banner {
  text-align: center;
  padding: 36px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 22px;
}

.complete-banner .cb-icon,
.complete-banner .complete-icon { font-size: 2.5rem; margin-bottom: 10px; }
.complete-banner h3 { font-size: 1.2rem; margin-bottom: 6px; }
.complete-banner p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 18px; }

/* ===== Stagger (minimal) ===== */

.stagger > * {
  opacity: 0;
  animation: fadeIn 0.2s ease-out forwards;
}
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 30ms; }
.stagger > *:nth-child(3) { animation-delay: 60ms; }
.stagger > *:nth-child(4) { animation-delay: 90ms; }

/* ===== Tooltip ===== */

.tooltip { position: relative; }
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%; left: 50%;
  transform: translateX(-50%);
  padding: 5px 8px;
  background: #1f2937;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 0.72rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}
.tooltip:hover::after { opacity: 1; }

/* ===== How It Works Page ===== */

.hiw-intro {
  text-align: center;
  padding: 36px 28px;
  margin-bottom: 28px;
}

.hiw-intro-icon { font-size: 2.5rem; margin-bottom: 12px; }
.hiw-intro h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.hiw-intro p { color: var(--text-secondary); font-size: 0.9rem; max-width: 600px; margin: 0 auto; line-height: 1.6; }

/* Pipeline visual */
.hiw-pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
  padding: 20px 0;
}

.hiw-pipeline-step { text-align: center; }

.hiw-pipeline-node {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--bg-card);
  border: 3px solid;
  margin: 0 auto 8px;
}

.hiw-pipeline-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.hiw-pipeline-connector {
  width: 80px;
  height: 3px;
  border-radius: 2px;
  margin-bottom: 24px;
}

/* Sections */
.hiw-section {
  margin-bottom: 36px;
}

.hiw-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.hiw-section-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.hiw-section-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hiw-section-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 18px;
  line-height: 1.5;
}

/* Steps */
.hiw-steps {
  display: grid;
  gap: 14px;
}

.hiw-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.hiw-step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--accent);
  color: white;
  flex-shrink: 0;
}

.hiw-step-content { flex: 1; min-width: 0; }
.hiw-step-content h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; }
.hiw-step-content p { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.5; margin-bottom: 8px; }

.hiw-optional {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
}

.hiw-link {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 600;
}
.hiw-link:hover { text-decoration: underline; }

.hiw-tip {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 8px 12px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  margin-top: 6px;
  line-height: 1.4;
}

.hiw-formats {
  display: flex;
  gap: 8px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.hiw-format-tag {
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--info-bg);
  color: var(--info);
}

.hiw-table-preview {
  margin: 10px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  font-size: 0.78rem;
}

.hiw-table-preview table { font-size: 0.78rem; }
.hiw-table-preview td { max-width: none; white-space: normal; font-family: var(--font-mono); font-size: 0.72rem; }

.hiw-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px;
  margin: 8px 0;
}

.hiw-check-item {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 3px 0;
}

/* Flow diagrams */
.hiw-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 18px;
}

.hiw-flow-item {
  flex: 1;
  text-align: center;
  padding: 22px 16px;
  min-width: 0;
}

.hiw-flow-icon { font-size: 1.6rem; margin-bottom: 10px; }
.hiw-flow-item h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }
.hiw-flow-item p { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }

.hiw-flow-arrow {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  padding: 0 6px;
  flex-shrink: 0;
}

/* Portal grid */
.hiw-portals { margin-top: 18px; padding: 18px; }
.hiw-portals h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 12px; }

.hiw-portal-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hiw-portal-tag {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

/* Highlight box */
.hiw-highlight {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  border-left: 3px solid var(--success);
}

.hiw-highlight-icon { font-size: 1.4rem; flex-shrink: 0; }
.hiw-highlight h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.hiw-highlight p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

/* Strategy visual */
.hiw-strategy { padding: 18px; }
.hiw-strategy h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }
.hiw-strategy > p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 14px; }

.hiw-strategy-visual {
  display: grid;
  gap: 8px;
}

.hiw-lane {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hiw-lane-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 80px;
  text-align: right;
  flex-shrink: 0;
}

.hiw-lane-bar {
  height: 8px;
  border-radius: 4px;
  opacity: 0.7;
  animation: laneGrow 1s ease-out forwards;
}

@keyframes laneGrow {
  from { width: 0 !important; }
}

/* Info cards grid */
.hiw-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.hiw-info-card {
  text-align: center;
  padding: 22px 16px;
}

.hiw-info-icon { font-size: 1.5rem; margin-bottom: 10px; }
.hiw-info-card h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }
.hiw-info-card p { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }

/* CLI Commands */
.hiw-commands { display: grid; gap: 0; padding: 0; overflow: hidden; }

.hiw-command {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.hiw-command:last-child { border-bottom: none; }

.hiw-command-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hiw-command code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-light);
  word-break: break-all;
}

/* CTA */
.hiw-cta {
  margin: 36px 0;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Simple big-picture steps */
.hiw-simple-steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.hiw-simple-step {
  text-align: center;
  padding: 28px 20px;
  position: relative;
}

.hiw-simple-icon { font-size: 2rem; margin-bottom: 8px; }

.hiw-simple-num {
  position: absolute;
  top: 12px; left: 14px;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.72rem;
  background: var(--accent);
  color: white;
}

.hiw-simple-step h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; }
.hiw-simple-step p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

/* Action instruction box */
.hiw-do-this {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  border-left: 3px solid var(--accent);
  font-size: 0.85rem;
  color: var(--text-primary);
  margin: 10px 0;
  line-height: 1.5;
}

.hiw-do-label {
  font-weight: 700;
  color: var(--accent);
  margin-right: 6px;
}

/* Action cards (API providers) */
.hiw-action-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0;
}

.hiw-action-card {
  padding: 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.hiw-action-card strong { display: block; margin-bottom: 4px; font-size: 0.85rem; }
.hiw-action-card p { color: var(--text-secondary); font-size: 0.78rem; margin: 0; line-height: 1.4; }

/* Numbered sub-steps */
.hiw-numbered-list { margin: 10px 0; display: grid; gap: 8px; }

.hiw-numbered-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.hiw-num-circle {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-muted);
  flex-shrink: 0;
  text-transform: lowercase;
}

/* Status grid */
.hiw-status-grid {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.hiw-status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Dashboard tour grid */
.hiw-tour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.hiw-tour-card {
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.hiw-tour-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.hiw-tour-icon { font-size: 1.5rem; margin-bottom: 8px; }
.hiw-tour-card h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.hiw-tour-card p { font-size: 0.72rem; color: var(--text-muted); line-height: 1.4; }

/* Portal showcase */
.hiw-portal-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.hiw-portal-item {
  padding: 18px;
  text-align: center;
}

.hiw-portal-emoji { font-size: 1.6rem; display: block; margin-bottom: 8px; }
.hiw-portal-item h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.hiw-portal-item p { font-size: 0.72rem; color: var(--text-muted); line-height: 1.4; }

/* Trust / safety grid */
.hiw-trust-grid {
  display: grid;
  gap: 12px;
}

/* FAQ */
.hiw-faq {
  display: grid;
  gap: 10px;
}

.hiw-faq-item {
  padding: 18px;
}

.hiw-faq-item h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }
.hiw-faq-item p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

/* Final CTA */
.hiw-final-cta {
  text-align: center;
  padding: 36px 28px;
  margin: 28px 0;
}

.hiw-final-cta h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.hiw-final-cta p { color: var(--text-secondary); font-size: 0.9rem; }

/* Responsive */
@media (max-width: 768px) {
  .hiw-flow { flex-direction: column; }
  .hiw-flow-arrow { transform: rotate(90deg); justify-content: center; padding: 6px 0; }
  .hiw-pipeline-connector { width: 40px; }
  .hiw-step { flex-direction: column; gap: 10px; }
  .hiw-simple-steps { grid-template-columns: 1fr; }
  .hiw-action-cards { grid-template-columns: 1fr; }
  .hiw-tour-grid { grid-template-columns: repeat(2, 1fr); }
  .hiw-portal-showcase { grid-template-columns: repeat(2, 1fr); }
}
