/* ================================================
   INVITI — auth.css  (login / register pages)
   ================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --rose:    #e8637a;
  --rose-dk: #c94a60;
  --rose-lt: #fde8ec;
  --dark:    #0f0f1a;
  --mid:     #5a5a7a;
  --border:  #e5e7eb;
  --bg:      #f9fafb;
  --white:   #ffffff;
  --radius:  14px;
  --t:       .22s ease;
  --ff:      'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--ff);
  background: linear-gradient(135deg, #0f0f1a 0%, #1e1230 50%, #0d1f2d 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
}

/* Blobs */
.auth-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .18;
  pointer-events: none;
}
.auth-blob--1 { width: 500px; height: 500px; background: #e8637a; top: -200px; right: -150px; }
.auth-blob--2 { width: 350px; height: 350px; background: #a78bfa; bottom: -100px; left: -80px; }

/* ── Card ── */
.auth-card {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 44px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 32px 80px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.1);
  position: relative;
  z-index: 1;
}

.auth-logo {
  text-align: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}
.auth-logo span { color: var(--rose); }

.auth-desc {
  text-align: center;
  font-size: .85rem;
  color: var(--mid);
  margin-bottom: 32px;
  line-height: 1.5;
}

/* ── Tabs ── */
.auth-tabs {
  display: flex;
  background: var(--bg);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 28px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  border-radius: 9px;
  font-family: var(--ff);
  font-size: .875rem;
  font-weight: 600;
  color: var(--mid);
  cursor: pointer;
  transition: all var(--t);
}
.auth-tab.active {
  background: var(--white);
  color: var(--dark);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

/* ── Form ── */
.auth-form { display: none; }
.auth-form.active { display: block; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-field {
  margin-bottom: 16px;
}
.form-field label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}
.field-wrap {
  position: relative;
}
.field-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: .85rem;
  pointer-events: none;
}
.form-field input {
  width: 100%;
  padding: 12px 14px 12px 38px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--ff);
  font-size: .9rem;
  color: var(--dark);
  background: var(--white);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
  -webkit-appearance: none;
}
.form-field input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(232,99,122,.12);
}
.form-field input.err { border-color: #ef4444; }
.form-field input::placeholder { color: #9ca3af; }
.eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  font-size: .85rem;
}

/* ── Submit ── */
.btn-auth {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--rose), var(--rose-dk));
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-family: var(--ff);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity var(--t), transform var(--t);
  box-shadow: 0 4px 20px rgba(232,99,122,.4);
  min-height: 52px;
}
.btn-auth:hover { opacity: .9; transform: translateY(-1px); }
.btn-auth:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ── Error / success messages ── */
.auth-msg {
  font-size: .82rem;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: none;
  font-weight: 500;
}
.auth-msg.show { display: block; }
.auth-msg.error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.auth-msg.success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* ── Divider ── */
.auth-divider {
  text-align: center;
  font-size: .78rem;
  color: var(--mid);
  margin: 20px 0;
  position: relative;
}
.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: var(--border);
}
.auth-divider span {
  background: var(--white);
  padding: 0 12px;
  position: relative;
}

/* ── Back link ── */
.auth-back {
  text-align: center;
  margin-top: 20px;
  font-size: .82rem;
  color: var(--mid);
}
.auth-back a {
  color: var(--rose);
  font-weight: 600;
  text-decoration: none;
  transition: opacity var(--t);
}
.auth-back a:hover { opacity: .8; }

/* ── Password strength ── */
.pwd-strength {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
.pwd-strength-bar {
  height: 100%;
  border-radius: 2px;
  transition: all .3s ease;
  width: 0;
}
.pwd-hint { font-size: .72rem; color: var(--mid); margin-top: 4px; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .auth-card { padding: 32px 24px; border-radius: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .auth-logo { font-size: 1.9rem; }
}
