/* auth.css - Modern Clean SaaS Authentication Styles */

/* Import Preferred Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&family=Tajawal:wght@400;500;700&display=swap');

:root {
  --auth-bg: #f8fafc;
  --auth-card-bg: #ffffff;
  --auth-primary: #41228e;
  --auth-primary-hover: #331b71;
  --auth-text-main: #1e293b;
  --auth-text-muted: #64748b;
  --auth-border: #e2e8f0;
  --auth-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --auth-radius: 16px;
  --auth-font-family: 'Cairo', 'Tajawal', sans-serif;
}

/* Apply preferred font to all auth elements */
.auth-wrapper,
.auth-container,
.auth-card,
.auth-logo,
.auth-header,
.auth-form,
.auth-footer,
.auth-options,
.auth-link {
  font-family: var(--auth-font-family);
}

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--auth-bg);
  background-image:
    radial-gradient(at 0% 0%, rgba(65, 34, 142, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(253, 177, 87, 0.05) 0px, transparent 50%);
  padding: 1.5rem;
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  background: var(--auth-card-bg);
  padding: 2.5rem;
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  border: 1px solid var(--auth-border);
}

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

.auth-logo h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--auth-primary);
  letter-spacing: -0.025em;
}

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

.auth-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--auth-text-main);
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--auth-text-muted);
  font-size: 0.95rem;
}

/* Form Styles */
.auth-form .field {
  margin-bottom: 1.25rem;
}

.auth-form .label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--auth-text-main);
  margin-bottom: 0.5rem;
  text-align: inherit;
}

html[dir="rtl"] .auth-form .label {
  text-align: right;
}

html[dir="ltr"] .auth-form .label {
  text-align: left;
}

.auth-input-wrapper {
  position: relative;
}

.auth-input-wrapper input {
  width: 100%;
  height: 48px;
  padding: 0.75rem 2.75rem 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--auth-border);
  font-size: 0.95rem;
  transition: all 0.2s;
  background: #fcfdfe;
  text-align: inherit;
}

html[dir="ltr"] .auth-input-wrapper input {
  padding: 0.75rem 1rem 0.75rem 2.75rem;
}

.auth-input-wrapper input:focus {
  outline: none;
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(65, 34, 142, 0.1);
  background: #fff;
}

.auth-input-wrapper i {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  color: var(--auth-text-muted);
  font-size: 1.1rem;
}

html[dir="ltr"] .auth-input-wrapper i {
  right: auto;
  left: 1rem;
}

/* Buttons */
.btn-auth {
  width: 100%;
  height: 48px;
  background: var(--auth-primary);
  color: white !important;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 1rem;
}

.btn-auth:hover {
  background: var(--auth-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(65, 34, 142, 0.2);
}

.btn-auth:active {
  transform: translateY(0);
}

/* Google Button */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  height: 48px;
  background: white;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  color: var(--auth-text-main) !important;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  transition: all 0.2s;
  margin-bottom: 1.5rem;
}

.google-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--auth-text-muted);
  font-size: 0.85rem;
}

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

/* Alerts */
.auth-error,
.auth-success {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
}

.auth-error {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #b91c1c;
}

.auth-success {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  color: #15803d;
}

/* Password Toggle */
.password-toggle {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--auth-text-muted);
  cursor: pointer;
  padding: 5px;
}

html[dir="ltr"] .password-toggle {
  left: auto;
  right: 0.75rem;
}

/* Footer & Links */
.auth-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.925rem;
  color: var(--auth-text-muted);
}

.auth-link {
  color: var(--auth-primary);
  font-weight: 600;
  text-decoration: none;
}

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

.auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
}

.auth-options .checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--auth-text-muted);
  cursor: pointer;
}

/* Register Specific */
.password-strength {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0;
  transition: all 0.3s;
}

.strength-weak .strength-bar {
  background: #ef4444;
  width: 33.33%;
}

.strength-medium .strength-bar {
  background: #f59e0b;
  width: 66.66%;
}

.strength-strong .strength-bar {
  background: #10b981;
  width: 100%;
}

/* Forgot Password Progress */
.auth-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  gap: 0.75rem;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.progress-step.active .step-number {
  background: var(--auth-primary);
  color: white;
}

.step-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
}

.progress-step.active .step-text {
  color: var(--auth-primary);
}

.progress-line {
  width: 32px;
  height: 1px;
  background: #e2e8f0;
}

.lang-switcher-wrapper {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

.lang-switcher-btn {
  background: white;
  border: 1px solid var(--auth-border);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}