/* ================================================================
   auth.css — Penguin Global Rise Auth Pages
   ================================================================ */

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020817;
  font-family: 'Poppins', 'Inter', sans-serif;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2.5rem 0;
}

.auth-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.auth-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: orbFloat 12s ease-in-out infinite;
}

.auth-bg-orb-1 { width: 500px; height: 500px; background: radial-gradient(circle, #6366f1, #4f46e5); top: -150px; left: -150px; animation-duration: 14s; }
.auth-bg-orb-2 { width: 400px; height: 400px; background: radial-gradient(circle, #a855f7, #7c3aed); bottom: -100px; right: -100px; animation-duration: 10s; animation-delay: -4s; }
.auth-bg-orb-3 { width: 300px; height: 300px; background: radial-gradient(circle, #0ea5e9, #0284c7); top: 40%; left: 50%; animation-duration: 16s; animation-delay: -8s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -30px) scale(1.05); }
  66%       { transform: translate(-20px, 20px) scale(0.95); }
}

.auth-wrapper {
  position: relative; z-index: 1; width: 100%; max-width: 460px;
  padding: 1rem 1.25rem; display: flex; flex-direction: column;
  align-items: center; gap: 1.5rem; margin: auto 0;
}

.auth-wrapper.auth-wrapper-wide {
  max-width: 680px;
}

.auth-brand {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; color: #f1f5f9;
  font-size: 1.25rem; font-weight: 600; transition: opacity 0.2s;
}
.auth-brand:hover { opacity: 0.8; }
.auth-brand img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.auth-brand strong { color: #818cf8; }

.auth-card {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 25px 50px rgba(0,0,0,0.5), 0 0 80px rgba(99,102,241,0.08);
  animation: cardEntrance 0.5s ease-out both;
}

@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-form-header { text-align: center; margin-bottom: 1.75rem; }
.auth-icon { font-size: 2.5rem; margin-bottom: 0.5rem; display: block; }
.auth-title { font-size: 1.75rem; font-weight: 700; color: #f1f5f9; margin: 0 0 0.4rem; letter-spacing: -0.02em; }
.auth-subtitle { font-size: 0.875rem; color: #64748b; margin: 0; }

.auth-alert { padding: 0.75rem 1rem; border-radius: 10px; font-size: 0.875rem; margin-bottom: 1.25rem; font-weight: 500; }
.auth-alert-success { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3); color: #86efac; }
.auth-alert-error   { background: rgba(239,68,68,0.12);  border: 1px solid rgba(239,68,68,0.3);  color: #fca5a5; }

.auth-form { display: flex; flex-direction: column; gap: 1.25rem; }
.auth-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.auth-grid-full {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .auth-form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .auth-grid-full {
    grid-column: span 1;
  }
}
.auth-field { display: flex; flex-direction: column; gap: 0.4rem; }
.auth-label { font-size: 0.8125rem; font-weight: 500; color: #94a3b8; letter-spacing: 0.02em; }

.auth-input-wrap { position: relative; display: flex; align-items: center; }
.auth-input-icon  { position: absolute; left: 0.875rem; font-size: 1rem; pointer-events: none; z-index: 1; }

.auth-input {
  width: 100%; padding: 0.75rem 0.875rem 0.75rem 2.75rem;
  background: rgba(30, 41, 59, 0.8); border: 1.5px solid rgba(100, 116, 139, 0.3);
  border-radius: 10px; color: #f1f5f9; font-size: 0.9375rem; font-family: inherit;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.auth-input::placeholder { color: #475569; }
.auth-input:focus { border-color: #6366f1; background: rgba(30,41,59,1); box-shadow: 0 0 0 3px rgba(99,102,241,0.2); }
.auth-field.has-error .auth-input { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.auth-error { font-size: 0.75rem; color: #f87171; font-weight: 500; }

.auth-toggle-pass { position: absolute; right: 0.875rem; background: none; border: none; cursor: pointer; font-size: 1rem; color: #64748b; padding: 0; transition: color 0.2s; }
.auth-toggle-pass:hover { color: #94a3b8; }

.auth-remember { display: flex; align-items: center; }
.auth-checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.875rem; color: #94a3b8; user-select: none; }
.auth-checkbox-label input[type="checkbox"] { display: none; }
.auth-checkbox-custom { width: 18px; height: 18px; border: 1.5px solid rgba(100,116,139,0.4); border-radius: 4px; background: rgba(30,41,59,0.8); transition: all 0.2s; flex-shrink: 0; }
.auth-checkbox-label input[type="checkbox"]:checked ~ .auth-checkbox-custom { background: #6366f1; border-color: #6366f1; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='white' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; }

.auth-password-strength { height: 4px; background: rgba(100,116,139,0.2); border-radius: 2px; overflow: hidden; margin-top: 0.4rem; }
.strength-fill { height: 100%; width: 0%; border-radius: 2px; transition: width 0.3s, background 0.3s; }
.auth-password-hint { font-size: 0.75rem; font-weight: 500; margin-top: 0.2rem; }

.auth-submit-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: none; border-radius: 10px; color: #fff;
  font-size: 1rem; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 4px 20px rgba(99,102,241,0.4); margin-top: 0.25rem;
}
.auth-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(99,102,241,0.5); }
.auth-submit-btn:active { transform: translateY(0); }
.auth-submit-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.auth-btn-icon { font-size: 1.1rem; }

.auth-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-divider { position: relative; text-align: center; margin: 1.5rem 0 1rem; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: rgba(100,116,139,0.2); }
.auth-divider span { position: relative; z-index: 1; background: rgba(15,23,42,0.85); padding: 0 1rem; font-size: 0.8125rem; color: #475569; }

.auth-secondary-btn {
  display: block; text-align: center; padding: 0.75rem;
  background: rgba(99,102,241,0.08); border: 1.5px solid rgba(99,102,241,0.3);
  border-radius: 10px; color: #818cf8; font-size: 0.9375rem; font-weight: 500;
  text-decoration: none; transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.auth-secondary-btn:hover { background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.5); color: #a5b4fc; transform: translateY(-1px); }

.auth-footer-text { font-size: 0.75rem; color: #334155; text-align: center; }

/* ── Navbar Auth Buttons ───────────────────────────────────────── */
.btn-outline-nav {
  display: inline-flex; align-items: center;
  padding: 0.45rem 1.1rem;
  background: transparent; border: 1.5px solid rgba(99,102,241,0.5);
  border-radius: 8px; color: #818cf8;
  font-size: 0.875rem; font-weight: 500; text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s; margin-right: 0.5rem;
}
.btn-outline-nav:hover { background: rgba(99,102,241,0.12); border-color: #6366f1; color: #a5b4fc; }

/* ── User Dropdown ────────────────────────────────────────────── */
.nav-user-menu { position: relative; display: inline-flex; align-items: center; }

.nav-user-btn {
  display: flex; align-items: center; gap: 0.5rem;
  background: rgba(99,102,241,0.1); border: 1.5px solid rgba(99,102,241,0.3);
  border-radius: 50px; padding: 0.35rem 0.9rem 0.35rem 0.4rem;
  cursor: pointer; color: #e2e8f0; font-family: inherit;
  font-size: 0.875rem; font-weight: 500; transition: background 0.2s, border-color 0.2s;
}
.nav-user-btn:hover, .nav-user-btn.active { background: rgba(99,102,241,0.2); border-color: #6366f1; }

.nav-user-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; font-weight: 700; font-size: 0.75rem; display: flex; align-items: center; justify-content: center; }
.nav-user-name { max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-user-chevron { font-size: 0.75rem; color: #64748b; transition: transform 0.2s; }
.nav-user-btn.active .nav-user-chevron { transform: rotate(180deg); }

.nav-user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 180px;
  background: rgba(15,23,42,0.97); backdrop-filter: blur(16px);
  border: 1px solid rgba(99,102,241,0.25); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5); overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s; z-index: 999;
}
.nav-user-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }

.nav-dropdown-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1rem; color: #94a3b8; text-decoration: none; font-size: 0.875rem; font-weight: 500; transition: background 0.15s, color 0.15s; border: none; background: none; width: 100%; cursor: pointer; font-family: inherit; text-align: left; }
.nav-dropdown-item:hover { background: rgba(99,102,241,0.1); color: #f1f5f9; }
.nav-dropdown-logout:hover { background: rgba(239,68,68,0.1); color: #f87171; }

@media (max-width: 480px) {
  .auth-card { padding: 2rem 1.25rem; border-radius: 16px; }
  .auth-title { font-size: 1.5rem; }
}