/*
  auth.css - Login, Register, Forgot Password pages only.
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .auth-panel-float, .auth-form-panel, .auth-panel {
    animation: none !important;
  }
  .auth-panel-float { display: none !important; }
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 440px;
}

.auth-panel {
  background: #111827;
  background-image:
    radial-gradient(ellipse at 15% 70%, rgba(22,163,74,.18) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(22,163,74,.08) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem 3.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.auth-panel::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

/* Floating decorative elements on auth panel */
.auth-panel-float {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.auth-panel-float-1 {
  width: 80px; height: 80px;
  background: rgba(22,163,74,.08);
  top: 15%; right: 10%;
  animation: auth-float-1 8s ease-in-out infinite;
}
.auth-panel-float-2 {
  width: 50px; height: 50px;
  background: rgba(37,99,235,.06);
  bottom: 25%; left: 8%;
  animation: auth-float-2 10s ease-in-out infinite;
}
.auth-panel-float-3 {
  width: 30px; height: 30px;
  background: rgba(74,222,128,.1);
  top: 55%; right: 25%;
  animation: auth-float-3 7s ease-in-out infinite;
}

@keyframes auth-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  50% { transform: translate(-15px, 10px) scale(1.15); opacity: 1; }
}
@keyframes auth-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(10px, -12px) scale(1.1); opacity: 0.8; }
}
@keyframes auth-float-3 {
  0%, 100% { transform: translate(0, 0); opacity: 0.4; }
  50% { transform: translate(-8px, -8px); opacity: 0.7; }
}

.auth-panel-top    { position: relative; z-index: 1; }
.auth-panel-bottom { position: relative; z-index: 1; }

.auth-panel-logo {
  display: flex; align-items: center; gap: 0.65rem;
  margin-bottom: 3.5rem;
}

.auth-panel-logo .logo-mark {
  width: 32px; height: 32px;
  background: #16a34a; border-radius: 8px; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(22,163,74,.4);
}

.auth-panel-logo-text { font-size: 0.9rem; font-weight: 800; color: #fff; letter-spacing: -0.3px; }

.auth-panel h2 {
  font-size: 2rem; font-weight: 800; line-height: 1.2;
  letter-spacing: -0.8px; margin-bottom: 0.75rem;
}
.auth-panel h2 em { font-style: normal; color: #4ade80; }

.auth-panel-tagline {
  font-size: 0.85rem; color: rgba(255,255,255,.5);
  line-height: 1.7; max-width: 320px; margin-bottom: 2.5rem;
}

.auth-features { display: flex; flex-direction: column; gap: 0.85rem; }

.auth-feature { display: flex; align-items: flex-start; gap: 0.75rem; }

.auth-feature-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #16a34a; flex-shrink: 0; margin-top: 6px;
  animation: auth-dot-pulse 2.5s ease-in-out infinite;
}
.auth-feature:nth-child(2) .auth-feature-dot { animation-delay: 0.5s; }
.auth-feature:nth-child(3) .auth-feature-dot { animation-delay: 1s; }

@keyframes auth-dot-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(22,163,74,.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(22,163,74,0); }
}

.auth-feature p { font-size: 0.82rem; color: rgba(255,255,255,.55); line-height: 1.55; }

.auth-panel-footer {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.5rem; font-size: 0.75rem; color: rgba(255,255,255,.25);
}

/* Form panel entrance animation */
.auth-form-panel {
  background: #ffffff;
  display: flex; flex-direction: column; justify-content: center;
  padding: 3rem; border-left: 1px solid #e5e7eb; overflow-y: auto;
  background-image: radial-gradient(ellipse at 100% 0%, rgba(22,163,74,.03) 0%, transparent 60%);
  animation: auth-form-slide-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
  position: relative;
}

/* Subtle noise texture on form panel */
.auth-form-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

@keyframes auth-form-slide-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.auth-form-header { margin-bottom: 2rem; }
.auth-form-header h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; color: #111827; line-height: 1.2; }
.auth-form-header p  { font-size: 0.8rem; color: #9ca3af; margin-top: 0.3rem; }

.auth-form-footer { margin-top: 1.5rem; font-size: 0.78rem; color: #9ca3af; text-align: center; }
.auth-form-footer a { color: #16a34a; font-weight: 700; }
.auth-form-footer a:hover { text-decoration: underline; }

@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-panel { display: none; }
  .auth-form-panel { padding: 2.5rem 1.5rem; border-left: none; }
}

@media (max-width: 480px) {
  .auth-form-panel { padding: 2rem 1.25rem; }
  .auth-form-header h1 { font-size: 1.2rem; }
  .auth-form-panel .otp-input {
    font-size: 1.3rem;
    letter-spacing: 0.25rem;
    padding: 0.6rem 0.5rem;
  }
  .shield-icon {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.2rem !important;
  }
}
