/* Authentication Pages Styles - Black/Gold Theme */

.auth-body {
  margin: 0;
  padding: 0;
  font-family: "Playfair Display", serif;
  background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  position: relative;
}

.register-layout {
  grid-template-columns: 1fr 1fr;
}

/* Image Section */
.auth-image-section {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.auth-image-overlay {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.4) 100%);
}

.auth-image-content {
  text-align: center;
  color: var(--text-primary);
  max-width: 400px;
}

.auth-image-content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-image-content p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

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

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

.feature-item i {
  font-size: 1.2rem;
  color: var(--accent-green);
  width: 24px;
  text-align: center;
}

.feature-item span {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* Form Section */
.auth-form-section {
  background: var(--bg-container);
  backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.auth-form-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.auth-form-container {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.auth-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Admin specific styles */
.admin-auth .auth-image-overlay {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.4) 100%);
}

.admin-header {
  position: relative;
}

.admin-badge {
  background: linear-gradient(135deg, #fcda19, #f4d03f);
  color: #000000;
}

.admin-badge i {
  font-size: 1.5rem;
  color: white;
}

/* Form Styles */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.required {
  color: var(--btn-secondary-start);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  padding-left: 2.75rem;
  border: 2px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
  backdrop-filter: blur(5px);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  outline: none;
}

.form-control:focus {
  border-color: #fcda19;
  box-shadow: 0 0 0 3px rgba(252, 218, 25, 0.1);
  background: var(--bg-container);
}

.form-control.valid {
  border-color: #fcda19;
  box-shadow: 0 0 0 3px rgba(252, 218, 25, 0.1);
}

.form-control.invalid {
  border-color: var(--btn-secondary-start);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.form-control::placeholder {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  z-index: 2;
  transition: color 0.3s ease;
}

.form-control:focus + .input-icon,
.form-control.valid + .input-icon {
  color: #fcda19;
}

.form-control.invalid + .input-icon {
  color: var(--btn-secondary-start);
}

.password-toggle {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  z-index: 2;
}

.password-toggle:hover {
  color: #fcda19;
  background: rgba(252, 218, 25, 0.1);
}

/* Field Validation */
.field-error {
  font-size: 0.75rem;
  color: var(--btn-secondary-start);
  margin-top: 0.25rem;
  min-height: 1rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.field-error:empty {
  display: none;
}

.field-help {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Password Strength */
.password-strength {
  margin-top: 0.5rem;
}

.strength-bar {
  width: 100%;
  height: 4px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.strength-fill {
  height: 100%;
  width: 0%;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.strength-fill.weak {
  width: 25%;
  background: var(--btn-secondary-start);
}

.strength-fill.medium {
  width: 60%;
  background: var(--btn-warning-start);
}

.strength-fill.strong {
  width: 100%;
  background: var(--btn-success-start);
}

.strength-text {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
}

.strength-text.weak {
  color: var(--btn-secondary-start);
}

.strength-text.medium {
  color: var(--btn-warning-start);
}

.strength-text.strong {
  color: var(--btn-success-start);
}

.password-requirements {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.requirement {
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.requirement.met {
  color: var(--btn-success-start);
}

.requirement i {
  font-size: 0.6rem;
  width: 12px;
}

.requirement.met i::before {
  content: "\f00c"; /* fa-check */
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.5rem 0;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-primary);
  position: relative;
}

.checkbox-wrapper input[type="checkbox"] {
  opacity: 0;
  position: absolute;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--bg-card);
  position: relative;
  transition: all 0.3s ease;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
  background: #fcda19;
  border-color: #fcda19;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
  content: "\f00c";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.7rem;
}

.forgot-password {
  color: #fcda19;
  text-decoration: none;
  transition: color 0.3s ease;
}

.forgot-password:hover {
  color: #f4d03f;
  text-decoration: underline;
}

/* Buttons */
.btn-auth {
  padding: 0.875rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-auth:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loader {
  display: none;
}

.btn-auth.loading .btn-text {
  display: none;
}

.btn-auth.loading .btn-loader {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-btn {
  background: linear-gradient(135deg, #fcda19, #f4d03f);
  color: #000000;
  box-shadow: 0 4px 15px rgba(252, 218, 25, 0.4);
}

.admin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(252, 218, 25, 0.6);
}

/* Alerts */
.alert {
  padding: 0.875rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  backdrop-filter: blur(5px);
}

.alert-error {
  background: rgba(255, 107, 107, 0.15);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: var(--btn-secondary-start);
}

.alert-success {
  background: rgba(252, 218, 25, 0.15);
  border: 1px solid rgba(252, 218, 25, 0.3);
  color: #fcda19;
}

/* Footer */
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.auth-footer p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.auth-link {
  color: #fcda19;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.auth-link:hover {
  color: #f4d03f;
  text-decoration: underline;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  text-align: center;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.auth-divider span {
  padding: 0 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-container);
}

/* Admin Login Link */
.admin-login-link {
  text-align: center;
}

.admin-login-link .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
}

/* Security Notice */
.security-notice {
  background: rgba(252, 218, 25, 0.1);
  border: 1px solid rgba(252, 218, 25, 0.2);
  border-radius: 6px;
  margin-top: 1.5rem;
  padding: 0.75rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.security-notice i {
  color: #fcda19;
}

.security-notice small {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Phone Input Styling */
.phone-input-container {
  position: relative;
  width: 100%;
}

.phone-input-wrapper {
  display: flex;
  width: 100%;
  border: 2px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  overflow: hidden;
}

.phone-input-wrapper:focus-within {
  border-color: #fcda19;
  box-shadow: 0 0 0 3px rgba(252, 218, 25, 0.1);
}

.phone-input-wrapper.valid {
  border-color: #fcda19 !important;
  box-shadow: 0 0 0 3px rgba(252, 218, 25, 0.1) !important;
}

.phone-input-wrapper.invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.phone-input-wrapper.warning {
  border-color: #eab308 !important;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1) !important;
}

.phone-input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  z-index: 2;
  transition: color 0.3s ease;
  pointer-events: none;
}

.phone-input-wrapper:focus-within .phone-input-icon,
.phone-input-wrapper.valid .phone-input-icon {
  color: #fcda19;
}

.phone-input-wrapper.invalid .phone-input-icon {
  color: #ef4444;
}

.country-select {
  border: none;
  background: transparent;
  padding: 0.75rem 0.5rem 0.75rem 2.75rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  min-width: 120px;
  border-right: 1px solid var(--border-subtle);
  font-family: inherit;
}

.country-select option {
  background: var(--bg-container);
  color: var(--text-primary);
  padding: 0.5rem;
}

.phone-number-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  min-width: 0;
}

.phone-number-input::placeholder {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Responsive adjustments for phone input */
@media (max-width: 768px) {
  .country-select {
    min-width: 100px;
    padding: 0.75rem 0.25rem 0.75rem 2.5rem;
    font-size: 0.85rem;
  }

  .phone-number-input {
    padding: 0.75rem 0.75rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .country-select {
    min-width: 90px;
    padding: 0.625rem 0.25rem 0.625rem 2.25rem;
    font-size: 0.8rem;
  }

  .phone-number-input {
    padding: 0.625rem 0.5rem;
    font-size: 0.8rem;
  }

  .phone-input-icon {
    left: 0.75rem;
    font-size: 0.8rem;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .auth-container {
    grid-template-columns: 1fr;
  }

  .auth-image-section {
    display: none;
  }

  .auth-form-section {
    min-height: 100vh;
  }

  .register-layout .auth-image-section {
    display: none;
  }
}

@media (max-width: 768px) {
  .auth-form-container {
    max-width: 100%;
    padding: 1rem;
  }

  .auth-header h1 {
    font-size: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .password-requirements {
    grid-template-columns: 1fr;
  }

  .form-options {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .form-control {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    font-size: 0.85rem;
  }

  .input-icon {
    left: 0.75rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .auth-form-section {
    padding: 1rem;
  }

  .auth-header {
    margin-bottom: 1.5rem;
  }

  .auth-header h1 {
    font-size: 1.25rem;
  }

  .form-control {
    padding: 0.625rem 1rem 0.625rem 2.25rem;
    font-size: 0.875rem;
  }

  .btn-auth {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
  }

  .input-icon {
    left: 0.75rem;
    font-size: 0.75rem;
  }

  .password-toggle {
    right: 0.75rem;
  }
}

/* Loading Animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.fa-spin {
  animation: spin 1s linear infinite;
}

/* Focus Styles for Accessibility */
.form-control:focus,
.checkbox-wrapper:focus-within,
.password-toggle:focus,
.btn-auth:focus {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .form-control {
    border-width: 3px;
  }

  .alert {
    border-width: 2px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Enhanced Validation Colors */
.form-control.valid {
  border-color: #fcda19 !important;
  box-shadow: 0 0 0 3px rgba(252, 218, 25, 0.1) !important;
}

.form-control.invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.form-control.warning {
  border-color: #eab308 !important;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1) !important;
}

.form-control:focus.valid {
  border-color: #fcda19 !important;
  box-shadow: 0 0 0 3px rgba(252, 218, 25, 0.2) !important;
}

.form-control:focus.invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.form-control:focus.warning {
  border-color: #eab308 !important;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2) !important;
}
