/* ===================== AUTH MODAL ===================== */
.auth-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-modal {
  border-radius: 20px;
  width: 820px;
  max-width: 94vw;
  max-height: 88vh;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  overflow: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.auth-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(0,0,0,0.2);
  border: none;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.auth-close:hover {
  background: rgba(0,0,0,0.3);
  transform: rotate(90deg);
}

/* Split Layout */
.auth-split {
  display: flex;
  min-height: 520px;
}

/* Hero Panel */
.auth-hero {
  width: 340px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.auth-hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover !important;
  background-position: center !important;
}
.auth-hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(160deg, rgba(30, 60, 120, 0.88) 0%, rgba(15, 30, 70, 0.92) 100%);
}
.auth-hero-content {
  position: relative;
  z-index: 2;
  padding: 45px 35px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-hero-logo {
  width: 100px;
  margin-bottom: 20px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}
.auth-hero-content h2 {
  color: #fff;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 8px 0;
}
.auth-hero-content > p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  margin: 0 0 25px 0;
  letter-spacing: 1px;
  font-style: italic;
}
.auth-hero-quote {
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  font-style: italic;
  border-left: 3px solid rgba(255,255,255,0.3);
  padding-left: 14px;
  margin-bottom: 25px;
  line-height: 1.5;
}
.auth-hero-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auth-hero-feat {
  color: rgba(255,255,255,0.75);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-hero-feat i {
  color: #4ade80;
  font-size: 0.7rem;
}

/* Form Panel */
.auth-panel {
  flex: 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px;
}
.auth-panel-inner {
  width: 100%;
  max-width: 360px;
}
.auth-tabs {
  display: flex;
  background: #f0f4fc;
  border-radius: 50px;
  padding: 4px;
  margin-bottom: 28px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #666;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.auth-tab.active {
  background: linear-gradient(135deg, #3b66b4, #2a4b8a);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59,102,180,0.3);
}
.auth-form {
  display: none;
}
.auth-form.active {
  display: block;
  animation: authPanelFade 0.4s ease;
}
@keyframes authPanelFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.auth-form-icon {
  text-align: center;
  margin-bottom: 12px;
}
.auth-form-icon i {
  font-size: 1.6rem;
  color: #3b66b4;
  background: #eef3fc;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.auth-form h3 {
  font-size: 1.4rem;
  color: #1a1a2e;
  margin: 0 0 4px 0;
  font-weight: 700;
  text-align: center;
}
.auth-sub {
  color: #888;
  margin: 0 0 22px 0;
  font-size: 0.88rem;
  text-align: center;
}
.auth-field {
  margin-bottom: 14px;
  position: relative;
}
.auth-field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #bbb;
  font-size: 0.9rem;
  pointer-events: none;
  transition: color 0.2s;
}
.auth-field:focus-within .auth-field-icon {
  color: #3b66b4;
}
.auth-field input {
  width: 100%;
  padding: 13px 13px 13px 42px;
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  background: #f8f9fc;
  box-sizing: border-box;
}
.auth-field input:focus {
  border-color: #3b66b4;
  box-shadow: 0 0 0 3px rgba(59,102,180,0.08);
  background: #fff;
}
.auth-field input::placeholder {
  color: #bbb;
  font-size: 0.88rem;
}
.auth-forgot-row {
  text-align: right;
  margin: -8px 0 14px 0;
}
.auth-forgot-row a {
  color: #3b66b4;
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 0.3s;
}
.auth-forgot-row a:hover {
  color: #1a3a6a;
  text-decoration: underline;
}
.auth-error {
  color: #e74c3c;
  font-size: 0.82rem;
  margin-bottom: 10px;
  min-height: 0;
  line-height: 1.3;
  text-align: center;
}
.auth-success {
  color: #28a745;
  font-size: 0.82rem;
  margin-bottom: 10px;
  line-height: 1.3;
  text-align: center;
}
.auth-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #3b66b4, #2a4b8a);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, opacity 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59,102,180,0.35);
}
.auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.auth-submit i {
  font-size: 0.85rem;
}
.auth-divider {
  text-align: center;
  margin: 16px 0;
  position: relative;
}
.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e9ecef;
}
.auth-divider span {
  background: #fff;
  padding: 0 14px;
  color: #aaa;
  font-size: 0.8rem;
  position: relative;
  z-index: 1;
}
.auth-google {
  width: 100%;
  padding: 11px;
  background: #fff;
  color: #555;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.auth-google:hover {
  border-color: #3b66b4;
  background: #f8f9ff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

/* User Info */
.auth-user {
  text-align: center;
  padding: 10px 0;
  position: relative;
}
.auth-user-glow {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(59,102,180,0.12), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.auth-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b66b4, #2a4b8a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: bold;
  margin: 0 auto 14px;
  box-shadow: 0 8px 25px rgba(59,102,180,0.3);
  position: relative;
  z-index: 1;
  animation: authAvatarPulse 2s ease infinite;
}
@keyframes authAvatarPulse {
  0%, 100% { box-shadow: 0 8px 25px rgba(59,102,180,0.3); }
  50% { box-shadow: 0 8px 35px rgba(59,102,180,0.45); }
}
.auth-user h3 {
  margin: 0 0 4px 0;
  color: #1a1a2e;
  font-size: 1.2rem;
}
.auth-user p {
  margin: 0 0 20px 0;
  color: #888;
  font-size: 0.88rem;
  word-break: break-all;
}

@media (max-width: 700px) {
  .auth-hero { display: none; }
  .auth-modal { border-radius: 16px; }
  .auth-panel { padding: 30px 22px; }
  .auth-split { min-height: auto; }
}
