/* ─────────────────────────────────────────────────────────────────────
   auth.css — Premium App-Like Interface v6
   ───────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --bg: #0b0e14;
  /* Professional Navy Dark */
  --card: rgba(255, 255, 255, 0.03);
  /* Glassmorphism Base */
  --panel: #1a1f26;
  /* Softer Input Background */
  --text: #f8fafc;
  --text-dim: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --accent: #6366f1;
  --radius: 20px;
}

body {
  min-height: 100vh;
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 40%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-x: hidden;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

/* ── Card (Glassmorphism) ── */
.auth-card {
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  width: 520px;
  max-width: 95%;
  padding: 2rem;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--border);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
  animation: cardFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Logo ── */
.auth-logo {
  text-align: center;
  margin-bottom: 1rem;
}

.auth-logo a {
  text-decoration: none;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.auth-logo span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Headings ── */
.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  width: 100%;
}

.auth-sub {
  color: var(--text-dim);
  text-align: center;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ── Form Fields ── */
.p-auth-form {
  width: 100% !important;
  margin: 0 auto !important;
  display: block !important;
}

.field {
  margin-bottom: 0.75rem;
  width: 100% !important;
  display: block !important;
  text-align: left !important;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  width: 100%;
}

.input-group {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: all 0.3s ease;
  overflow: hidden;
  width: 100% !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
}

.input-group:focus-within {
  border-color: #3b82f6;
  /* Electric Blue focus */
  background: rgba(26, 31, 38, 0.8);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

input[type=email],
input[type=password],
input[type=text] {
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  flex: 1 0 auto !important;
  padding: 0.8rem 1.1rem !important;
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  font-size: 0.95rem !important;
  font-family: inherit !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: none !important;
  /* Eliminate transitions on width/size */
}

/* ── Password Eyes (Absolute Positioning) ── */
.toggle-pass {
  position: absolute;
  right: 15px;
  /* Fixed absolute position */
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  /* Default opacity */
  transition: all 0.2s ease;
  z-index: 10;
}

.toggle-pass:hover {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
  /* Soft blue glow */
}

.toggle-pass svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ── Buttons ── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  padding: 0 1.25rem;
  margin: 0.5rem auto 0;
  /* Deep Blue to Royal Blue Gradient */
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  margin-top: 0.75rem;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
  /* Glow shadow */
  letter-spacing: 0.02em;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.5);
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* ── Mobile Optimization (App Look) ── */
@media (max-width: 480px) {
  body {
    padding: 0;
    align-items: flex-end;
    background: #000;
  }

  .auth-card {
    border-radius: 32px 32px 0 0;
    max-width: 100%;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 3rem 1.5rem;
    box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.8);
    animation: slideUp 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
    }

    to {
      transform: translateY(0);
    }
  }

  .auth-card::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
  }
}

/* ── Google Button ── */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  height: 44px;
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 auto;
}

.btn-google:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  justify-content: center;
  margin: 1rem 0;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  width: 100%;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to var(--dir, right), transparent, var(--border), transparent);
}

.divider::before {
  --dir: right;
}

.divider::after {
  --dir: left;
}

.divider span {
  padding: 0 1.25rem;
  flex-shrink: 0;
}

/* ── Password strength (Legacy style integration) ── */
.strength-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  margin-top: .6rem;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .4s ease, background .4s ease;
}

.strength-text {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.5rem;
  text-align: center;
}

.req-list {
  margin: 0.75rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.req-list li {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 600;
}

.req-list li.ok {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.auth-links {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-dim);
}

.auth-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  margin: 0 0.5rem;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 0.75rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  text-align: center;
}

.auth-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #34d399;
  padding: 0.75rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  text-align: center;
}