/* ============================================================
   app.css — Shared styles for all Accelyst AI public pages
   ============================================================ */

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

:root {
  --primary: #e91e63;
  --primary-dark: #7a3678;
  --primary-hover: #c2185b;
  --bg: #12151f;
  --bg2: #1a1f2e;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --error-text: #fca5a5;
  --error-bg: rgba(248, 113, 113, 0.1);
  --error-border: rgba(248, 113, 113, 0.3);
  --field-err: #f87171;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

/* ── Header ── */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 40px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.header-logo {
  height: 32px;
}

.header-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.header-nav {
  display: flex;
  gap: 10px;
}

.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.header-nav a:hover {
  color: var(--text);
  border-color: var(--primary);
}

/* ── Buttons ── */
.btn-primary {
  padding: 12px 28px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-outline {
  padding: 12px 28px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Error box ── */
.error-box {
  display: none;
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 8px;
  padding: 14px 18px;
  color: var(--error-text);
  font-size: 0.9rem;
  margin-top: 16px;
  text-align: left;
}

.error-box.show {
  display: block;
}

/* ── Spinner ── */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(233, 30, 99, 0.2);
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}

/* ── Progress bar ── */
.progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0%;
}

/* ── Form shared ── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-field {
  margin-bottom: 16px;
}

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

.form-field label .req {
  color: var(--primary);
}

.form-field input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.form-field input:focus {
  border-color: var(--primary);
}
.form-field input.err {
  border-color: var(--field-err);
}

.field-err {
  color: var(--field-err);
  font-size: 0.8rem;
  margin-top: 4px;
}

/* ── Overlay / modal backdrop ── */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .header {
    padding: 14px 20px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}
