/**
 * CareerNest Login Page Styles
 * Minimal & Clean Design
 */

/* ========================================
   BASE STYLES & LAYOUT
   ======================================== */

.cn-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.cn-auth-container {
  width: 100%;
  max-width: 450px;
  position: relative;
}

/* ========================================
   MAIN AUTH CARD
   ======================================== */

.cn-auth-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  padding: 3rem 2.5rem;
  position: relative;
}

/* Remove unused elements */
.cn-auth-overlay,
.cn-auth-background,
.cn-auth-tabs {
  display: none !important;
}

/* ========================================
   FORMS CONTAINER
   ======================================== */

.cn-auth-forms {
  position: relative;
}

.cn-auth-form {
  opacity: 1;
  max-height: none;
  overflow: visible;
}

.cn-form-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #2d3748;
  text-align: center;
}

.cn-form-subtitle {
  text-align: center;
  color: #718096;
  margin: 0 0 2rem 0;
  font-size: 0.95rem;
}

/* ========================================
   SOCIAL LOGIN BUTTONS
   ======================================== */

.cn-social-login {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cn-social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  color: #4a5568;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cn-social-btn:not([disabled]):hover {
  border-color: #cbd5e0;
  background: #f7fafc;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cn-social-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.cn-social-btn svg {
  flex-shrink: 0;
}

/* ========================================
   FORM DIVIDER
   ======================================== */

.cn-form-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: #a0aec0;
  font-size: 0.875rem;
}

.cn-form-divider::before,
.cn-form-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.cn-form-divider span {
  padding: 0 1rem;
}

/* ========================================
   FORM GROUPS & INPUTS
   ======================================== */

.cn-form-group {
  margin-bottom: 1.25rem;
}

.cn-field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #2d3748;
  font-size: 0.875rem;
}

.cn-input-wrapper {
  position: relative;
}

.cn-input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
  pointer-events: none;
}

.cn-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background: #f7fafc;
  box-sizing: border-box;
  color: #2d3748;
}

.cn-input:focus {
  outline: none;
  border-color: #ff8200;
  background: white;
  box-shadow: 0 0 0 3px rgba(255, 130, 0, 0.08);
}

.cn-input::placeholder {
  color: #a0aec0;
}

.cn-input.error {
  border-color: #f56565;
  background: #fff5f5;
}

.cn-input.error:focus {
  box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1);
}

/* Password Toggle */
.cn-password-wrapper {
  position: relative;
}

.cn-password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #a0aec0;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.cn-password-toggle:hover {
  color: #ff8200;
}

/* Field Errors */
.cn-field-error {
  display: block;
  color: #f56565;
  font-size: 0.8rem;
  margin-top: 0.375rem;
  min-height: 1.2em;
}

/* ========================================
   CHECKBOX STYLES
   ======================================== */

.cn-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.cn-checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cn-checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e0;
  border-radius: 4px;
  position: relative;
  transition: all 0.2s ease;
}

input[type="checkbox"]:checked ~ .cn-checkbox-custom {
  border-color: #ff8200;
  background: #ff8200;
}

input[type="checkbox"]:checked ~ .cn-checkbox-custom::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
  line-height: 1;
}

.cn-checkbox-text {
  color: #4a5568;
  font-size: 0.875rem;
}

/* ========================================
   FORM OPTIONS (Remember Me, Forgot Password)
   ======================================== */

.cn-form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.cn-forgot-link {
  color: #ff8200;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.cn-forgot-link:hover {
  color: #e67300;
  text-decoration: underline;
}

/* ========================================
   BUTTONS
   ======================================== */

.cn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.cn-btn-primary {
  background: #ff8200;
  color: white;
}

.cn-btn-primary:hover:not(:disabled) {
  background: #e67300;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 130, 0, 0.25);
}

.cn-btn-outline {
  background: transparent;
  border: 2px solid #e2e8f0;
  color: #4a5568;
}

.cn-btn-outline:hover:not(:disabled) {
  background: #f7fafc;
  border-color: #ff8200;
  color: #ff8200;
}

.cn-btn-submit {
  width: 100%;
  margin-top: 0.5rem;
}

.cn-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Button Loading State */
.cn-btn-submit.loading .cn-btn-text {
  display: none;
}

.cn-btn-submit.loading .cn-btn-loader {
  display: block !important;
}

.cn-spinner {
  animation: cn-spin 1s linear infinite;
}

@keyframes cn-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   FORM MESSAGES
   ======================================== */

.cn-form-messages {
  margin-bottom: 1rem;
  min-height: 1px;
}

.cn-form-message {
  padding: 0.875rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: cn-slide-in 0.3s ease-out;
}

@keyframes cn-slide-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cn-form-message-error {
  background: #fff5f5;
  border: 1px solid #fc8181;
  color: #c53030;
}

.cn-form-message-success {
  background: #f0fff4;
  border: 1px solid #68d391;
  color: #22543d;
}

.cn-form-message-icon {
  flex-shrink: 0;
}

/* ========================================
   REGISTRATION LINKS
   ======================================== */

.cn-register-links {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.cn-register-text {
  color: #718096;
  font-size: 0.95rem;
  margin: 0 0 1rem 0;
}

.cn-register-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cn-register-buttons .cn-btn {
  width: 100%;
  justify-content: center;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 480px) {
  .cn-auth-page {
    padding: 1rem 0.5rem;
  }

  .cn-auth-card {
    padding: 2rem 1.5rem;
    border-radius: 8px;
  }

  .cn-form-title {
    font-size: 1.5rem;
  }

  .cn-input {
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    font-size: 0.9rem;
  }

  .cn-input-icon {
    left: 0.75rem;
    width: 18px;
    height: 18px;
  }

  .cn-btn-submit {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }

  .cn-social-login {
    flex-direction: column;
  }

  .cn-form-options {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.cn-btn:focus-visible,
.cn-input:focus-visible,
.cn-password-toggle:focus-visible,
.cn-social-btn:focus-visible {
  outline: 2px solid #ff8200;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
