/* ============================================================
   COMPONENTS – Cameras Decoded
   ============================================================ */

/* Auth wrapper */
.auth-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 48px 36px 40px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  animation: fadeSlide 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.signup-wrapper {
  max-width: 520px;
  padding: 32px 28px;
}

/* Logo area */
.logo-area { text-align: center; margin-bottom: 24px; }
.logo-area img { display: block; max-height: 100px; margin: 0 auto 12px; }
.logo-area h1 { font-family: var(--font-mono); font-size: 28px; color: var(--green); letter-spacing: -1px; }
.logo-area p { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }

/* Form */
.form-group { margin-bottom: 16px; position: relative; z-index: 1; }
.form-group label {
  display: block;
  color: var(--text-secondary);
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}
.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
}
.form-group input:focus {
  border-color: rgba(141, 235, 0, 0.3);
  box-shadow: 0 0 30px rgba(141, 235, 0, 0.03);
  background: rgba(255, 255, 255, 0.05);
}
.form-group input::placeholder { color: var(--text-muted); font-weight: 300; }

/* Password toggle */
.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 40px; }
.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 16px;
}
.toggle-password:hover { color: var(--green); }

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--green);
  border: none;
  border-radius: var(--radius-sm);
  color: #000;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
  box-shadow: 0 0 20px rgba(141,235,0,0.1);
}
.btn-primary:hover {
  background: #a0f520;
  box-shadow: 0 0 40px rgba(141,235,0,0.15);
  transform: scale(1.01);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-social {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.btn-social::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--green-soft);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.btn-social:hover {
  border-color: rgba(141, 235, 0, 0.25);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.btn-social:hover::after { opacity: 1; }
.btn-social:active { transform: translateY(0); }
.btn-social .social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.btn-social .social-icon svg { transition: transform 0.25s ease; }
.btn-social:hover .social-icon svg { transform: scale(1.05); }
.btn-social .btn-label { position: relative; z-index: 1; }

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0 22px;
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Error message */
.error-msg {
  color: #ff4d4d;
  margin-top: 14px;
  display: none;
  font-size: 13px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.error-box {
  background: rgba(255,68,68,0.1);
  border: 1px solid #ff4a4a;
  border-radius: 8px;
  padding: 10px 14px;
  color: #ff4a4a;
  font-size: 13px;
  margin-top: 12px;
  display: none;
}

/* Footer links */
.login-footer,
.bottom-links {
  margin-top: 24px;
  text-align: center;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.login-footer a,
.bottom-links a {
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 400;
}
.login-footer a:hover,
.bottom-links a:hover { color: var(--green); }

/* Spinner */
.spinner {
  display: none;
  width: 24px;
  height: 24px;
  border: 3px solid #222;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 12px auto 0;
}

/* Pricing grid */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0 16px;
}
.pricing-card {
  background: #0F0F0F;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}
.pricing-card:hover { border-color: var(--green); }
.pricing-card.selected { border-color: var(--green); box-shadow: 0 0 30px rgba(141,235,0,0.06); }
.pricing-card .name { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
.pricing-card .price { font-size: 24px; font-weight: 700; color: #fff; }
.pricing-card .price .currency { font-size: 14px; color: var(--text-muted); }
.pricing-card .period { font-size: 11px; color: #666; }
.pricing-card .features { font-size: 11px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }
.pricing-card .features i { color: var(--green); margin-right: 4px; }
.pricing-card .badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--green);
  color: #000;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  font-family: var(--font-mono);
  text-transform: uppercase;
}
.pricing-card .saving-badge {
  display: inline-block;
  background: rgba(141,235,0,0.15);
  color: var(--green);
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 2px 10px;
  border-radius: 20px;
  margin-top: 6px;
  border: 1px solid rgba(141,235,0,0.2);
}

/* Billing toggle */
.billing-toggle-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 10px 0 6px;
  font-size: 13px;
  color: var(--text-muted);
  transition: opacity 0.3s;
}
.billing-toggle-wrap.overridden { opacity: 0.5; pointer-events: none; }
.billing-toggle-wrap .override-label {
  font-size: 10px;
  color: var(--green);
  font-family: var(--font-mono);
  background: var(--green-dim);
  padding: 2px 10px;
  border-radius: 12px;
  border: 1px solid rgba(141,235,0,0.2);
  display: none;
}
.billing-toggle-wrap.overridden .override-label { display: inline-block; }
.billing-switch {
  width: 48px;
  height: 24px;
  background: #1A1A1A;
  border-radius: 12px;
  border: 1px solid var(--green);
  cursor: pointer;
  position: relative;
  transition: 0.3s;
  flex-shrink: 0;
}
.billing-switch .knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--green);
  border-radius: 50%;
  transition: left 0.3s ease;
  box-shadow: 0 0 12px var(--green-glow);
}
.billing-switch.annual .knob { left: 26px; }
.billing-switch.annual { border-color: var(--gold, #e0b12d); }

/* Weekly option */
.weekly-option {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 8px 0 4px;
  padding: 8px 16px;
  background: rgba(141,235,0,0.03);
  border: 2px solid rgba(141,235,0,0.12);
  border-radius: 30px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s;
  user-select: none;
}
.weekly-option:hover { border-color: rgba(141,235,0,0.35); background: rgba(141,235,0,0.05); }
.weekly-option.selected { border-color: var(--green); background: var(--green-dim); color: #fff; }
.weekly-option .weekly-price { font-weight: 700; color: var(--green); font-size: 16px; }
.weekly-option .weekly-save { font-size: 10px; color: var(--green); font-family: var(--font-mono); background: rgba(141,235,0,0.1); padding: 2px 10px; border-radius: 20px; }
.weekly-option .check-mark { display: none; color: var(--green); font-size: 14px; margin-left: 4px; }
.weekly-option.selected .check-mark { display: inline-block; }
.weekly-option .clear-btn { display: none; background: transparent; border: none; color: #666; font-size: 14px; cursor: pointer; padding: 0 4px; margin-left: 4px; }
.weekly-option .clear-btn:hover { color: #fff; }
.weekly-option.selected .clear-btn { display: inline-block; }

/* Role selection (if needed) */
.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 12px 0 20px;
}
.role-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-secondary);
}
.role-card i { font-size: 26px; color: var(--text-muted); margin-bottom: 6px; transition: 0.3s; }
.role-card h4 { font-family: var(--font-mono); font-size: 14px; color: var(--text-primary); margin-bottom: 2px; }
.role-card p { font-size: 11px; line-height: 1.3; color: var(--text-muted); }
.role-card:hover { border-color: rgba(141, 235, 0, 0.2); background: var(--green-soft); transform: translateY(-2px); }
.role-card.selected { border-color: var(--green); background: var(--green-dim); box-shadow: 0 0 30px rgba(141, 235, 0, 0.04); }
.role-card.selected i { color: var(--green); }
.role-card.operator-highlight { border-color: rgba(224, 177, 45, 0.2); }
.role-card.operator-highlight:hover { border-color: rgba(224, 177, 45, 0.3); }

/* Responsive */
@media (max-width: 480px) {
  .auth-wrapper, .signup-wrapper { padding: 32px 20px 28px; }
  .logo-area h1 { font-size: 20px; }
  .logo-area img { max-height: 80px; }
  .role-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
}