/* ═══════════════════════════════════════════════════
   ProjectFlow — Shared Design System
   ═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-900: #f5f7fb;
  --bg-800: #ffffff;
  --bg-700: #f8fafc;
  --bg-600: #eef2f7;
  --bg-500: #dfe7f1;
  --bg-panel: #f0f4f9;
  --border: rgba(148,163,184,0.18);
  --border-h: rgba(148,163,184,0.3);
  --border-s: rgba(148,163,184,0.42);
  --accent: #2563eb;
  --accent-l: #3b82f6;
  --accent-d: #1d4ed8;
  --accent-dim: rgba(37,99,235,0.1);
  --accent-glow: rgba(37,99,235,0.2);
  --amber: #d97706;
  --amber-dim: rgba(217,119,6,0.1);
  --emerald: #059669;
  --emerald-dim: rgba(5,150,105,0.1);
  --rose: #e11d48;
  --rose-dim: rgba(225,29,72,0.1);
  --sky: #0284c7;
  --sky-dim: rgba(2,132,199,0.1);
  --purple: #7c3aed;
  --purple-dim: rgba(124,58,237,0.1);
  --text-p: #0f172a;
  --text-s: #475569;
  --text-m: #64748b;
  --r: 10px;
  --r-sm: 6px;
  --r-lg: 14px;
  --r-xl: 20px;
  --shadow: 0 8px 24px rgba(15,23,42,0.08);
  --shadow-lg: 0 18px 50px rgba(15,23,42,0.12);
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  color: var(--text-p);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-500); border-radius: 20px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s;
  border: none;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  text-decoration: none;
}
.btn-p { background: var(--accent); color: #fff; }
.btn-p:hover { background: var(--accent-d); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99,102,241,0.35); }
.btn-p:active { transform: translateY(0); }
.btn-g { background: transparent; color: var(--text-s); border: 1px solid var(--border-h); }
.btn-g:hover { background: var(--bg-600); color: var(--text-p); border-color: var(--border-s); }
.btn-full { width: 100%; }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }

/* ── Form inputs ── */
.inp {
  background: var(--bg-700);
  border: 1px solid var(--border-h);
  border-radius: var(--r-sm);
  color: var(--text-p);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 10px 13px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  width: 100%;
}
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.inp::placeholder { color: var(--text-m); }
.inp.error { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-dim); }

/* ── Labels ── */
.lbl {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-s);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

/* ── Error text ── */
.err-txt {
  font-size: 12px;
  color: var(--rose);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-m);
  font-size: 12px;
  margin: 4px 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Tags / Badges ── */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
}
.badge-accent { background: var(--accent-dim); color: var(--accent-l); border: 1px solid var(--accent-glow); }
.badge-emerald { background: var(--emerald-dim); color: var(--emerald); }
.badge-rose { background: var(--rose-dim); color: var(--rose); }
.badge-amber { background: var(--amber-dim); color: var(--amber); }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-600);
  border: 1px solid var(--border-h);
  border-radius: var(--r);
  padding: 12px 18px;
  font-size: 13px;
  z-index: 9999;
  transform: translateY(60px);
  opacity: 0;
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
  max-width: 320px;
  box-shadow: var(--shadow);
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: rgba(16,185,129,.3); }
.toast.error { border-color: rgba(244,63,94,.3); }

/* ── Logo mark ── */
.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.logo-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.4px;
}

/* ── Social button ── */
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  background: var(--bg-700);
  border: 1px solid var(--border-h);
  border-radius: var(--r-sm);
  color: var(--text-p);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  font-family: 'DM Sans', sans-serif;
}
.social-btn:hover { background: var(--bg-600); border-color: var(--border-s); }

/* ── Password toggle ── */
.inp-wrap { position: relative; }
.inp-wrap .inp { padding-right: 44px; }
.inp-eye {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-m);
  cursor: pointer;
  font-size: 16px;
  padding: 2px;
  transition: color .15s;
  line-height: 1;
}
.inp-eye:hover { color: var(--text-s); }

/* ── Progress bar (registration steps) ── */
.step-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
}
.step-seg {
  flex: 1;
  height: 3px;
  border-radius: 20px;
  background: var(--bg-500);
  transition: background .3s;
}
.step-seg.done { background: var(--accent); }
.step-seg.active { background: var(--accent-l); }

/* ── Checkbox ── */
.cbx-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.cbx-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--border-h);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all .15s;
  background: var(--bg-700);
}
.cbx-wrap input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.cbx-wrap input[type="checkbox"]:checked::after {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 100%;
  height: 100%;
}
.cbx-label { font-size: 13px; color: var(--text-s); line-height: 1.5; }
.cbx-label a { color: var(--accent-l); text-decoration: none; }
.cbx-label a:hover { text-decoration: underline; }

/* ── Strength meter ── */
.strength-bar {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.strength-seg {
  flex: 1;
  height: 3px;
  border-radius: 20px;
  background: var(--bg-500);
  transition: background .3s;
}
.strength-label {
  font-size: 11px;
  margin-top: 4px;
  font-weight: 500;
}

/* ── Avatar upload ── */
.avatar-upload {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-600);
  border: 2px dashed var(--border-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .18s;
  font-size: 11px;
  color: var(--text-m);
  gap: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar-upload:hover { border-color: var(--accent); background: var(--accent-dim); color: var(--accent-l); }
.avatar-upload img { width: 100%; height: 100%; object-fit: cover; }

/* ── Utility ── */
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-m); }
.text-s { color: var(--text-s); }
.text-accent { color: var(--accent-l); }
.text-emerald { color: var(--emerald); }
.text-rose { color: var(--rose); }
.fw-600 { font-weight: 600; }
.fs-13 { font-size: 13px; }
.fs-12 { font-size: 12px; }
a { color: var(--accent-l); text-decoration: none; }
a:hover { text-decoration: underline; }
