/* Self-Service Onboarding — Greasebook Visual Language */

:root {
  --bg-dark: #0f1114;
  --bg-dark-card: #1a1d23;
  --bg-light: #fafaf9;
  --bg-light-alt: #f3f2ef;
  --text-dark: #0f1114;
  --text-light: #fafaf9;
  --text-muted: #6b7280;
  --accent: #51A69D;
  --accent-hover: #448f87;
  --accent-glow: rgba(81, 166, 157, 0.15);
  --red: #dc2626;
  --red-bg: rgba(220, 38, 38, 0.08);
  --green-bg: rgba(81, 166, 157, 0.08);
  --border: rgba(0,0,0,0.08);
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --max-w: 720px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-dark);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
}

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(15,17,20,0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}
.nav-logo {
  height: 28px;
}
.nav-title {
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  opacity: 0.7;
}

/* Layout */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 100px 24px 60px;
}

/* Page header */
.page-header {
  text-align: center;
  margin-bottom: 48px;
}
.step-label {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 12px;
}
.page-header p {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 560px;
  margin: 0 auto;
}

/* Step indicator */
.steps-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}
.step-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s, transform 0.3s;
}
.step-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}
.step-dot.completed {
  background: var(--accent);
  opacity: 0.5;
}

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px;
  margin-bottom: 24px;
}
.card h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 8px;
}
.card .subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 24px;
}

/* Step sections */
.step-section {
  display: none;
}
.step-section.active {
  display: block;
}

/* Drop zone */
.drop-zone {
  border: 2px dashed rgba(0,0,0,0.15);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.drop-zone-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.4;
}
.drop-zone-text {
  font-size: 16px;
  color: var(--text-muted);
}
.drop-zone-text strong {
  color: var(--accent);
  cursor: pointer;
}
.drop-zone-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  opacity: 0.7;
}

/* File list */
.file-list {
  margin-top: 16px;
  list-style: none;
}
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-light-alt);
  border-radius: var(--radius);
  margin-bottom: 6px;
  font-size: 14px;
}
.file-item-name {
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-item-size {
  color: var(--text-muted);
  font-size: 13px;
  margin-left: 12px;
  flex-shrink: 0;
}
.file-item-remove {
  color: var(--text-muted);
  cursor: pointer;
  margin-left: 12px;
  font-size: 18px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.file-item-remove:hover {
  opacity: 1;
  color: var(--red);
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-secondary:hover {
  background: var(--accent-glow);
}

.btn-group {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

/* Start from scratch link */
.scratch-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s;
}
.scratch-link:hover { color: var(--accent); }

/* Progress */
.progress-section {
  text-align: center;
}
.progress-bar-track {
  width: 100%;
  height: 8px;
  background: var(--bg-light-alt);
  border-radius: 4px;
  overflow: hidden;
  margin: 20px 0;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  width: 0%;
  transition: width 0.5s ease;
}
.progress-text {
  color: var(--text-muted);
  font-size: 15px;
}
.progress-file {
  font-weight: 500;
  color: var(--text-dark);
  margin-top: 4px;
  font-size: 14px;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Download section */
.download-section {
  text-align: center;
  padding: 32px 0;
}
.download-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.download-summary {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 24px;
}
.download-summary strong {
  color: var(--text-dark);
}

/* Error message */
.error-message {
  background: var(--red-bg);
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--red);
  font-size: 14px;
  margin-top: 16px;
}
.error-message:empty { display: none; }

/* Success */
.success-section {
  text-align: center;
  padding: 48px 0;
}
.success-icon {
  font-size: 56px;
  margin-bottom: 16px;
}
.success-section h2 {
  color: var(--accent);
  margin-bottom: 12px;
}
.success-section p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}

/* Validation list */
.validation-list {
  list-style: none;
  margin: 16px 0;
  text-align: left;
}
.validation-list li {
  padding: 8px 0;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.validation-list .pass { color: var(--accent); }
.validation-list .fail { color: var(--red); }
.validation-list .icon { flex-shrink: 0; }

/* Hidden file input */
.hidden { display: none; }

/* Responsive */
@media (max-width: 640px) {
  .container { padding: 80px 16px 40px; }
  .card { padding: 24px; }
  .page-header h1 { font-size: 28px; }
  .btn-group { flex-direction: column; }
  .btn { width: 100%; text-align: center; }
}
