/* ==========================================================================
   StudentJob Authentication Pages (Login & Register)
   Matches custom clean modern design with dynamic theme colors
   ========================================================================== */

.studentjob-auth-body {
  background-color: #f8fafc;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-main, 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  color: #0f172a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 18px;
  box-sizing: border-box;
}

.auth-container {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-container.register-container {
  max-width: 470px;
}

/* 1. Header with Logo & Language Toggle */
.auth-brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
  gap: 12px;
}

.auth-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.auth-logo-link:hover {
  transform: translateY(-1px);
}

.auth-logo-img {
  height: auto;
  max-height: 52px;
  width: auto;
  object-fit: contain;
}

/* Exact Brand Logo matching Home Page Header */
.auth-site-logo,
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f172a;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.auth-site-logo:hover,
.site-logo:hover {
  transform: translateY(-2px);
}

.site-logo .logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary, #1c7bff), var(--color-primary-hover, #a855f7));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 14px var(--color-primary-glow, rgba(28, 123, 255, 0.35));
  transition: box-shadow 0.2s ease;
}

.site-logo:hover .logo-mark {
  box-shadow: 0 6px 20px var(--color-primary-glow, rgba(28, 123, 255, 0.45));
}

.site-logo .logo-text {
  font-weight: 800;
  color: #0f172a;
}

.site-logo .logo-accent {
  color: var(--color-primary, #1c7bff);
}

/* Language Toggle Pill */
.auth-lang-toggle {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
}

.auth-lang-btn {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 16px;
  text-decoration: none;
  color: #64748b;
  text-transform: uppercase;
  transition: all 0.15s ease;
}

.auth-lang-btn:hover {
  color: #0f172a;
}

.auth-lang-btn.active {
  background: var(--color-primary, #2563eb);
  color: #ffffff;
  box-shadow: 0 2px 4px var(--color-primary-glow, rgba(37, 99, 235, 0.25));
}

.auth-lang-btn[data-lang="sq"].active,
.auth-lang-btn[data-lang="sq_AL"].active,
.auth-lang-btn[data-lang="sq-al"].active {
  background-color: #dc2626 !important;
  background-image: url('../images/alb.jpg') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.95) !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35) !important;
}

/* 2. Main Authentication Card */
.auth-card {
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 36px 36px 32px 36px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
  box-sizing: border-box;
  transition: box-shadow 0.25s ease;
}

.auth-card:hover {
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.06);
}

.auth-header-text {
  text-align: center;
  margin-bottom: 24px;
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 0.92rem;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

/* 3. Role Selection Segmented Pill (Register page) */
.auth-role-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 20px;
}

.role-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  outline: none;
}

.role-tab-btn:hover {
  color: #0f172a;
}

.role-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* 4. Google Auth Button */
.auth-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  color: #1e293b;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.auth-google-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.auth-google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* 5. Divider Line */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
  padding: 0 12px;
}

/* 6. Form Fields */
.auth-form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-field-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.auth-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-input-wrapper {
  position: relative;
  width: 100%;
}

.auth-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.92rem;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
  transition: all 0.2s ease;
}

.auth-input::placeholder {
  color: #94a3b8;
}

.auth-input:focus {
  border-color: var(--color-primary, #2563eb);
  box-shadow: 0 0 0 3px var(--color-primary-glow, rgba(37, 99, 235, 0.15));
}

.auth-input.has-toggle {
  padding-right: 42px;
}

/* Password Eye Toggle Button */
.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
  outline: none;
}

.password-toggle-btn:hover {
  color: #475569;
}

.password-toggle-btn svg {
  width: 18px;
  height: 18px;
}

/* Extra Company Field Toggle Animation */
.company-extra-field {
  display: none;
}

.company-extra-field.visible {
  display: flex;
  animation: fadeInDown 0.25s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 7. Submit Action Button */
.auth-submit-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--color-primary, #2563eb);
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 4px 14px var(--color-primary-glow, rgba(37, 99, 235, 0.28));
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  outline: none;
}

.auth-submit-btn:hover {
  background: var(--color-primary-hover, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--color-primary-glow, rgba(37, 99, 235, 0.38));
}

.auth-submit-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.auth-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: authSpin 0.7s linear infinite;
  display: none;
}

.auth-spinner.is-active {
  display: inline-block;
}

@keyframes authSpin {
  to { transform: rotate(360deg); }
}

/* 8. Alert Box */
.auth-alert {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: none;
  line-height: 1.4;
  text-align: left;
}

.auth-alert.is-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #b91c1c;
}

.auth-alert.is-success {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  color: #15803d;
}

/* 9. Card Footer Switch Link */
.auth-switch-text {
  text-align: center;
  font-size: 0.9rem;
  color: #64748b;
  margin: 22px 0 0 0;
}

.auth-switch-text a {
  color: var(--color-primary, #2563eb);
  font-weight: 700;
  text-decoration: none;
  transition: text-decoration 0.15s ease;
}

.auth-switch-text a:hover {
  text-decoration: underline;
}

/* 10. Back to Home link at bottom */
.auth-bottom-nav {
  margin-top: 24px;
  text-align: center;
}

.auth-back-link {
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}

.auth-back-link:hover {
  color: #475569;
}

/* Responsive */
@media (max-width: 480px) {
  .studentjob-auth-body {
    padding: 24px 14px;
  }
  .auth-card {
    padding: 28px 20px 24px 20px;
    border-radius: 16px;
  }
  .auth-row-2col {
    grid-template-columns: 1fr;
  }
  .auth-title {
    font-size: 1.4rem;
  }
}
