/* ── MUBLOGMARKETPLACE — SHARED AUTH CSS ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #6C63FF;
  --primary-light: #8B85FF;
  --primary-dark: #4B44CC;
  --accent: #A78BFA;
  --bg: #F0F4FF;
  --bg2: #E8EEFF;
  --white: #ffffff;
  --text: #1A1A2E;
  --text-light: #4A4A68;
  --text-muted: #7878A3;
  --card-bg: rgba(255,255,255,0.92);
  --border: rgba(108,99,255,0.15);
  --border-input: #D8DAED;
  --shadow: 0 8px 32px rgba(108,99,255,0.12);
  --shadow-lg: 0 20px 60px rgba(108,99,255,0.18);
  --radius: 14px;
  --radius-lg: 22px;
  --font: 'Plus Jakarta Sans', sans-serif;
  --error: #EF4444;
  --success: #22C55E;
  --warning: #F59E0B;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* BG MESH */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 0% 0%, rgba(108,99,255,0.13) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(167,139,250,0.11) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 50% 50%, rgba(186,230,253,0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── AUTH WRAPPER ── */
.auth-page {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── TOP BAR ── */
.auth-topbar {
  padding: 18px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 800;
  color: white;
  letter-spacing: -1px;
  box-shadow: 0 4px 14px rgba(108,99,255,0.35);
  flex-shrink: 0;
}

.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text span:first-child { font-size: 14px; font-weight: 800; color: var(--primary); letter-spacing: -0.4px; }
.logo-text span:last-child { font-size: 10px; font-weight: 500; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }

.auth-topbar-link { font-size: 14px; color: var(--text-light); text-decoration: none; font-weight: 500; }
.auth-topbar-link span { color: var(--primary); font-weight: 700; }
.auth-topbar-link:hover span { text-decoration: underline; }

/* ── AUTH CONTAINER ── */
.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 5% 60px;
}

/* ── AUTH CARD ── */
.auth-card {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 44px 48px;
  width: 100%;
  max-width: 460px;
}

.auth-card-wide { max-width: 520px; }

.auth-head { margin-bottom: 32px; }

.auth-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(108,99,255,0.12), rgba(167,139,250,0.15));
  border: 1px solid rgba(108,99,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}

.auth-head h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.7px;
  color: var(--text);
  margin-bottom: 8px;
}

.auth-head p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 7px;
}

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

.input-wrap .input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 15px;
  pointer-events: none;
  z-index: 1;
}

.input-wrap .input-eye {
  position: absolute;
  right: 14px;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  z-index: 1;
  background: none;
  border: none;
  padding: 4px;
  transition: color 0.2s;
}

.input-wrap .input-eye:hover { color: var(--primary); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
select {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--border-input);
  border-radius: 11px;
  padding: 0 44px 0 44px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

input:not(.has-icon) { padding-left: 14px; }

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.1);
}

input.error { border-color: var(--error); }
input.error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.1); }

.field-error {
  font-size: 12px;
  color: var(--error);
  margin-top: 5px;
  display: none;
  align-items: center;
  gap: 4px;
}

.field-error.show { display: flex; }

/* ── PASSWORD STRENGTH ── */
.pw-strength { margin-top: 8px; }
.pw-bars { display: flex; gap: 4px; height: 4px; }
.pw-bar { flex: 1; border-radius: 4px; background: #E2E4F0; transition: background 0.3s; }
.pw-label { font-size: 11px; color: var(--text-muted); margin-top: 5px; }

/* ── CHECKBOX ── */
.check-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}

.check-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1.5px solid var(--border-input);
  border-radius: 5px;
  cursor: pointer;
  padding: 0;
  margin-top: 1px;
  accent-color: var(--primary);
}

.check-group label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 0;
  font-weight: 400;
  cursor: pointer;
  line-height: 1.5;
}

.check-group label a { color: var(--primary); text-decoration: none; font-weight: 600; }
.check-group label a:hover { text-decoration: underline; }

/* ── FORGOT LINK ── */
.forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -10px;
  margin-bottom: 18px;
}

.forgot-link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.forgot-link:hover { text-decoration: underline; }

/* ── BUTTONS ── */
.btn-auth {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 18px rgba(108,99,255,0.35);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  letter-spacing: -0.2px;
}

.btn-auth:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(108,99,255,0.45);
}

.btn-auth:disabled { opacity: 0.65; cursor: not-allowed; }

.btn-auth .spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn-auth.loading .spinner { display: block; }
.btn-auth.loading .btn-text { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── DIVIDER ── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-input);
}

/* ── ALERTS ── */
.alert {
  display: none;
  padding: 13px 16px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 20px;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.alert.show { display: flex; }
.alert i { margin-top: 1px; flex-shrink: 0; font-size: 15px; }

.alert-error { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); color: #B91C1C; }
.alert-error i { color: var(--error); }
.alert-success { background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2); color: #15803D; }
.alert-success i { color: var(--success); }
.alert-info { background: rgba(108,99,255,0.07); border: 1px solid rgba(108,99,255,0.18); color: var(--primary-dark); }
.alert-info i { color: var(--primary); }

/* ── AUTH FOOTER ── */
.auth-footer-text {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-footer-text a { color: var(--primary); font-weight: 700; text-decoration: none; }
.auth-footer-text a:hover { text-decoration: underline; }

/* ── ADMIN BADGE ── */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(167,139,250,0.12));
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
}

/* ── STEPS (reset password) ── */
.steps-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}

.step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--border-input);
  color: var(--text-muted);
  background: var(--white);
  transition: all 0.3s;
  flex-shrink: 0;
}

.step-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 3px 12px rgba(108,99,255,0.35);
}

.step-dot.done {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border-input);
  transition: background 0.3s;
}

.step-line.done { background: var(--success); }

/* RESPONSIVE */
@media (max-width: 520px) {
  .auth-card { padding: 32px 24px; }
  .form-row { grid-template-columns: 1fr; }
}
