/* auth.css - Shared authentication pages styles (signin, signup, forgot) */

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

:root {
  --bg-base:        #030712;
  --bg-card:        rgba(17, 24, 39, 0.72);
  --glass-border:   rgba(255, 255, 255, 0.08);
  --text-primary:   #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted:     #64748b;
  --accent-cyan:    #00f0ff;
  --accent-blue:    #3b82f6;
  --accent-purple:  #8b5cf6;
  --color-success:  #10b981;
  --color-danger:   #ef4444;
  --r-sm:           8px;
  --r-md:           14px;
  --r-lg:           24px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* === ANIMATED BACKGROUND === */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

#particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.orb-1 {
  width: 700px; height: 700px;
  top: -20%; left: -10%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.07), transparent 70%);
  animation: driftOrb 22s ease-in-out infinite;
}
.orb-2 {
  width: 500px; height: 500px;
  bottom: -10%; right: -5%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.09), transparent 70%);
  animation: driftOrb 28s ease-in-out infinite reverse;
}
.orb-3 {
  width: 350px; height: 350px;
  top: 40%; left: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.06), transparent 70%);
  animation: driftOrb 18s ease-in-out infinite;
  animation-delay: -5s;
}

@keyframes driftOrb {
  0%, 100% { transform: translate(0, 0); }
  33%       { transform: translate(30px, -20px); }
  66%       { transform: translate(-15px, 15px); }
}

/* === LAYOUT === */
.auth-layout {
  display: flex;
  min-height: 100vh;
}

/* Brand Panel - Left side desktop only */
.brand-panel {
  width: 45%;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.04), rgba(139, 92, 246, 0.03));
  border-right: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.brand-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 380px;
}

.brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.3);
}

.brand-logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.brand-headline {
  font-family: 'Outfit', sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
}

.text-glow {
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtext {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.brand-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: 16px 20px;
  flex: 1;
  min-width: 100px;
}

.bs-value {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.bs-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Plan preview box (signup) */
.plan-preview-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: var(--r-md);
  padding: 20px;
}

.ppb-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.ppb-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ppb-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.ppb-list i {
  color: var(--color-success);
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* === FORM PANEL === */
.form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
}

.form-inner {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Mobile Logo (hidden on desktop) */
.mobile-logo {
  display: none;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 8px;
}
.mobile-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}
.mobile-logo span {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
}

/* FORM CARD */
.form-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 40px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.form-header {
  margin-bottom: 28px;
}

.form-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.form-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ALERTS */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  margin-bottom: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.alert-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

/* FIELDS */
.field-group {
  margin-bottom: 20px;
}

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.req { color: var(--color-danger); }

.forgot-link {
  font-size: 0.82rem;
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  transition: opacity 0.2s;
}
.forgot-link:hover { opacity: 0.75; }

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

.field-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 1;
}

.field-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  padding: 14px 16px 14px 42px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-input::placeholder {
  color: var(--text-muted);
}

.field-input:focus {
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.07);
}

.field-input[readonly] {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.02);
  cursor: not-allowed;
}

.toggle-pass {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
  transition: color 0.2s;
}
.toggle-pass:hover { color: var(--accent-cyan); }

/* Row layout for 2 fields side by side */
.fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Terms checkbox */
.terms-row {
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  display: inline-block;
  position: relative;
  transition: all 0.2s;
  margin-top: 2px;
}

.checkbox-label input:checked + .checkbox-custom {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.25);
}

.checkbox-label input:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  top: 3px; left: 5px;
  width: 5px; height: 9px;
  border: 2px solid #000;
  border-top: none; border-left: none;
  transform: rotate(45deg);
}

/* SUBMIT BUTTON */
.btn-submit {
  width: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  border: none;
  border-radius: var(--r-sm);
  padding: 15px;
  color: #030712;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px -5px rgba(59, 130, 246, 0.4);
  margin-bottom: 4px;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -5px rgba(139, 92, 246, 0.5);
}

.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Form footer link */
.form-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.form-link {
  color: var(--accent-cyan);
  font-weight: 600;
  transition: opacity 0.2s;
}

.form-link:hover { opacity: 0.8; }

/* Bottom Security Note */
.form-bottom-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .brand-panel {
    display: none;
  }
  .auth-layout {
    justify-content: center;
  }
  .mobile-logo {
    display: flex;
  }
  .signin-page .mobile-logo {
    width: 100%;
    align-self: center;
    justify-content: center;
    text-align: center;
  }
  .form-panel {
    align-items: flex-start;
    padding: 24px 16px;
  }
}

.signin-page .brand-logo-wrap {
  align-self: center;
  justify-content: center;
}

@media (max-width: 600px) {
  body {
    font-size: 14px;
    background: var(--bg-base);
  }
  .auth-layout {
    min-height: 100svh;
  }
  .form-panel {
    padding: 18px 20px;
    background:
      radial-gradient(circle at 82% 8%, rgba(0, 240, 255, 0.11), transparent 28%),
      radial-gradient(circle at 12% 88%, rgba(139, 92, 246, 0.1), transparent 32%),
      linear-gradient(180deg, #030712 0%, #071020 100%);
  }
  .signin-page .form-panel {
    align-items: center;
  }
  .form-inner {
    max-width: 390px;
    gap: 18px;
  }
  .mobile-logo {
    width: 100%;
    align-self: flex-start;
    justify-content: flex-start;
    margin-bottom: 0;
    gap: 8px;
  }
  .signin-page .mobile-logo {
    align-self: flex-start;
    justify-content: flex-start;
    text-align: left;
  }
  .mobile-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }
  .mobile-logo span {
    font-size: 1.05rem;
  }
  .form-card {
    padding: 22px 18px;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    background: rgba(17, 24, 39, 0.58);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
  }
  .signin-page .form-inner {
    min-height: calc(100svh - 36px);
  }
  .signin-page .form-card {
    width: 100%;
    margin-block: auto;
  }
  .form-header {
    margin-bottom: 22px;
  }
  .form-title {
    font-size: 1.5rem;
    margin-bottom: 5px;
  }
  .form-subtitle {
    font-size: 0.8rem;
    line-height: 1.45;
  }
  .field-group {
    margin-bottom: 13px;
  }
  .field-label {
    margin-bottom: 6px;
    font-size: 0.72rem;
  }
  .forgot-link {
    font-size: 0.72rem;
  }
  .field-icon {
    left: 13px;
    font-size: 0.82rem;
  }
  .field-input {
    min-height: 44px;
    padding: 11px 38px;
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.09);
  }
  .toggle-pass {
    right: 11px;
    font-size: 0.82rem;
  }
  .fields-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .terms-row {
    margin-bottom: 14px;
  }
  .checkbox-label {
    gap: 8px;
    font-size: 0.75rem;
    line-height: 1.4;
  }
  .checkbox-custom {
    width: 17px;
    height: 17px;
    min-width: 17px;
  }
  .btn-submit {
    min-height: 44px;
    padding: 11px 14px;
    font-size: 0.88rem;
  }
  .form-footer {
    margin-top: 14px;
    font-size: 0.78rem;
  }
  .form-bottom-note {
    font-size: 0.7rem;
    margin-top: 0;
  }
  .alert {
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 0.78rem;
  }
}

@media (max-width: 380px) {
  .form-panel {
    padding-inline: 16px;
  }
  .form-title {
    font-size: 1.3rem;
  }
  .form-card {
    padding: 20px 15px;
  }
}
