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

:root {
  --pink:       #FF40A0;
  --pink-light: #FFB7E6;
  --yellow:     #F0FE72;
  --teal:       #60A3A6;
  --bg:         #0A0E27;
  --surface:    #1A203A;
  --border:     rgba(255, 255, 255, 0.08);
  --text-white: #FFFFFC;
  --text-muted: #BDC2C9;
  --text-body:  #C8D0E7;
  --font:       'Inter', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text-white);
  font-family: var(--font);
  min-height: 100vh;
  display: block; /* ← change grid to block */
}
.signup-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
/* ── LEFT PANEL ── */
.left-panel {
  background: #080b1f;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
  overflow: hidden;
}

.left-panel::before {
  content: '';
  position: absolute;
  top: 5%; left: 5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(96,163,166,0.1), transparent 70%);
  pointer-events: none;
}

.left-content {
  position: relative;
  z-index: 1;
  max-width: 400px;
  width: 100%;
}

.left-content h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--text-white);
}

.gradient {
  background: linear-gradient(90deg, var(--pink), var(--pink-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.left-content p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

/* ── STATS CARD ── */
.stats-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-badge {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: rgba(26, 32, 58, 0.9);
  border: 1px solid rgba(240,254,114,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--yellow);
  flex-shrink: 0;
}

.stat-label {
  font-size: 14px;
  color: var(--text-body);
  font-weight: 500;
}

/* ── RIGHT PANEL ── */
.right-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background: #080b1f;
}

/* ── FORM CARD ── */
.form-card {
  width: 100%;
  max-width: 420px;
  background: #111827;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 32px;
}

.form-card h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-white);
}

.form-group {
  position: relative;
}

.form-group .error-msg {
  display: none;
  margin-top: 6px;
  width: 100%;

  font-size: 12px;
  line-height: 1.4;
  color: var(--pink, #ff40a0);
}

.form-group .error-msg.show {
  display: block;
}

.form-input.error {
  border-color: var(--pink, #ff40a0);
  box-shadow: 0 0 0 3px rgba(255, 64, 160, 0.12);
}

.subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ── ROLE SELECTOR ── */
.role-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  margin-bottom: 10px;
}

.role-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.btn-role {
  flex: 1;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0d1117;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-role.active {
  background: linear-gradient(90deg, var(--yellow), var(--teal));
  color: var(--bg);
  border: none;
}

.btn-role:hover:not(.active) {
  border-color: var(--text-muted);
  color: var(--text-white);
}

/* ── FORM FIELDS ── */
.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  margin-bottom: 8px;
}

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

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-white);
  font-size: 14px;
  pointer-events: none;
}

.form-input {
  width: 100%;
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 13px 18px 13px 40px;
  font-size: 14px;
  color: var(--text-white);
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(96,163,166,0.15);
}

.form-input.error {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255,64,160,0.2);
}

.btn-toggle-pw {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
 color: var(--text-white);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  transition: color 0.2s;
}
.btn-toggle-pw:hover { color: var(--text-white); }

/* ── ERROR MESSAGES ── */
.error-msg {
  font-size: 12px;
  color: var(--pink);
  margin-top: 5px;
  display: none;
}
.error-msg.show { display: block; }

/* ── TERMS ── */
.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.terms-row input[type="checkbox"] {
  margin-top: 2px;
  width: 15px;
  height: 15px;
  accent-color: var(--pink);
  flex-shrink: 0;
  cursor: pointer;
}

.terms-row a {
  color: var(--pink);
  text-decoration: none;
  font-weight: 600;
}
.terms-row a:hover { text-decoration: underline; }

.terms-error {
  font-size: 12px;
  color: var(--pink);
  margin-bottom: 12px;
  display: none;
}
.terms-error.show { display: block; }

/* ── CREATE ACCOUNT BUTTON ── */
.btn-create {
  display: block;
  width: 100%;
 
  background: linear-gradient(135deg, var(--pink), var(--pink-light));
  color: #fff; /* white text instead of dark */
  font-size: 15px;
  font-weight: 700;
  padding: 14px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  margin-bottom: 16px;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-create:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── SIGN IN LINK ── */
.signin-row {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.signin-row a {
  color: var(--pink);
  font-weight: 700;
  text-decoration: none;
}
.signin-row a:hover { text-decoration: underline; }

/* ── DIVIDER ── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 12px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

/* ── SOCIAL BUTTONS ── */
.social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-white);
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.2s;
}
.btn-social:hover { border-color: var(--text-muted); }
.signup-popup {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 39, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
}

.signup-popup.hidden {
  display: none;
}

.signup-popup-card {
  width: min(360px, calc(100% - 32px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.signup-popup-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(96, 163, 166, 0.18);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.signup-popup-icon.error {
  background: rgba(255, 64, 160, 0.16);
  color: var(--pink);
}

.signup-popup-card h3 {
  color: var(--text-white);
  font-size: 20px;
  margin-bottom: 8px;
}

.signup-popup-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}
.terms-error-msg {
  margin-top: -12px;
  margin-bottom: 14px;
}
.terms-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--pink, #FF40A0);
  cursor: pointer;
  text-decoration: underline;
}

.terms-modal-card {
  max-width: 520px;
  max-height: 80vh;
  text-align: left;
}

.terms-modal-body {
  max-height: 50vh;
  overflow-y: auto;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted, #BDC2C9);
}

.terms-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 18px;
}

.signup-popup-card.terms-modal-card {
  position: relative;
  width: min(520px, calc(100% - 32px));
  text-align: left;
}

.terms-modal-body ul {
  margin: 12px 0;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.legal-full-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--pink);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.legal-full-link:hover {
  text-decoration: underline;
}
.terms-row {
  flex-wrap: wrap;
  align-items: center;
}

.terms-check-label {
  cursor: pointer;
  margin-right: 4px;
}

.terms-label-text {
  font-size: 13px;
  color: var(--text-muted);
}
/* Override browser autofill background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #0d1117 inset !important;
  -webkit-text-fill-color: var(--text-white) !important;
  caret-color: var(--text-white);
  transition: background-color 5000s ease-in-out 0s;
}

.btn-toggle-pw i.fa-eye,
.btn-toggle-pw i.fa-eye-slash {
  color: #fffffc !important;
}
/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .signup-layout { grid-template-columns: 1fr; }
  .left-panel { display: none; }
  .right-panel { padding: 40px 20px; }
  .form-card { padding: 24px 20px; }
  .social-row {
    grid-template-columns: 1fr;
  }
}
