/* Auth Page Styles - MyBusinessSolutions */
:root {
  --brand: #1f4aa8; /* primary blue */
  --brand-2: #224c9a;
  --bg: #0d2a67; /* page backdrop tint */
  --text: #1a1a1a;
  --muted: #6b7280;
  --card: #ffffff;
  --input: #f3f4f6;
  --ring: rgba(31, 74, 168, 0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body.auth-body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  color: var(--text);
  /* Professional clean white background */
  background: #ffffff;
}

.auth-wrapper {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.login-card {
  width: min(100%, 980px);
  min-height: 520px;
  background: var(--card);
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

/* Left visual area */
.login-media {
  position: relative;
  /* Use our professional SVG illustration; falls back to a neutral gradient color */
  background: url('../images/auth/login-illustration.svg'), linear-gradient(180deg, #2a5ed1, #1f4aa8);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.login-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(21,57,140,0.25) 0%, rgba(10,31,86,0.55) 80%);
}

.media-overlay { /* contents within the left pane */
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center;
  gap: 20px; padding: 28px;
  color: #eef2f7;
  z-index: 1;
}

.brand-chip { 
  position: absolute; top: 18px; left: 18px; 
  display: inline-flex; align-items: center; gap: 10px; 
  padding: 8px 12px; background: rgba(255,255,255,.1); color: #fff; 
  border: 1px solid rgba(255,255,255,.2); border-radius: 999px; font-weight: 600; 
  backdrop-filter: blur(4px);
}
.brand-chip svg { color: #fff; }

.socials { display: flex; align-items: center; gap: 14px; }
.social-btn {
  width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center;
  background: rgba(255,255,255,.12); color: #fff; text-decoration: none; font-weight: 700;
  border: 1px solid rgba(255,255,255,.25);
  transition: all .2s ease;
}
.social-btn:hover { transform: translateY(-2px); background: rgba(255,255,255,.2); }

.signup-cta { color: #d1d5db; font-size: 14px; margin: 0; }
.signup-cta .signup-link { color: #fff; text-decoration: underline; font-weight: 600; }

/* Right form */
.login-form { padding: 42px 48px; display: flex; flex-direction: column; justify-content: center; }
.form-header { text-align: left; margin-bottom: 18px; }
.form-logo { display: block; margin-bottom: 8px; }
.form-header h1 { margin: 0; font-size: 26px; color: var(--brand); letter-spacing: .2px; font-weight: 700; }
.form-header p { margin: 6px 0 0; color: var(--muted); }

.form { margin-top: 18px; }
.input-group { margin-bottom: 16px; }
.input-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #374151; }
.input-group input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #fff;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.input-group input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); background: #fff; }

.password-field { position: relative; }
.password-field input {
  padding-right: 45px;
}
/* Hide browser's default password reveal button */
.password-field input::-ms-reveal,
.password-field input::-ms-clear {
  display: none;
}
.password-field input::-webkit-credentials-auto-fill-button,
.password-field input::-webkit-contacts-auto-fill-button {
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  right: 0;
}
.toggle-password {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; color: var(--brand); cursor: pointer;
  padding: 6px 8px; border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.toggle-password:hover { 
  background: rgba(31,74,168,.08);
  color: #2a5ed1;
}

.form-row { margin: 10px 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; user-select: none; cursor: pointer; color: #374151; }
.checkbox input { width: 16px; height: 16px; }

.btn.primary {
  width: 100%;
  padding: 12px 16px; border-radius: 6px; border: none; cursor: pointer;
  background: var(--brand); color: #fff; font-weight: 700; letter-spacing: .4px;
  box-shadow: 0 8px 16px rgba(31,74,168, .20);
  transition: transform .06s ease, background .2s ease, box-shadow .2s ease;
}
.btn.primary:hover { background: #2a5ed1; box-shadow: 0 10px 22px rgba(31,74,168,.26); }
.btn.primary:active { transform: translateY(1px); }

.link { color: var(--brand); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }
.small { font-size: 13px; color: var(--muted); }

.terms { text-align: center; margin-top: 14px; }

.back-home { display: inline-block; margin-top: 22px; color: #374151; text-decoration: none; }
.back-home:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 980px) {
  .login-card { grid-template-columns: 1fr; }
  .login-media { display: none; }
  .login-form { padding: 28px 24px; }
}
/* Login Message Styles */
.login-message {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  animation: slideIn 0.3s ease;
}

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

.login-message.success {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.login-message.error {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* Button loading state */
.btn.primary:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Forgot Password Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  transform: scale(0.8);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              opacity 0.4s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
  opacity: 1;
}

.modal-header {
  margin-bottom: 20px;
}

.modal-header h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  color: var(--brand);
  font-weight: 700;
}

.modal-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: #f3f4f6;
  color: var(--text);
}

.modal-body {
  margin-bottom: 20px;
}

.modal-footer {
  margin-top: 20px;
}

/* Email input with send button */
.email-input-wrapper {
  position: relative;
}

.email-input-wrapper input {
  padding-right: 45px;
}

.send-icon-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.send-icon-btn:hover {
  color: #2a5ed1;
  transform: translateY(-50%) scale(1.15);
}

.send-icon-btn:active {
  transform: translateY(-50%) scale(0.9);
}

.send-icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: translateY(-50%);
}

.send-icon-btn svg {
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.send-icon-btn:hover svg {
  transform: rotate(45deg) translateX(2px) translateY(-2px);
}

/* Reset Password Page */
.reset-password-card {
  width: min(100%, 480px);
  background: var(--card);
  padding: 42px 48px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.reset-header {
  text-align: center;
  margin-bottom: 32px;
}

.reset-header h1 {
  margin: 0 0 8px 0;
  font-size: 26px;
  color: var(--brand);
  font-weight: 700;
}

.reset-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.password-requirements {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px 16px;
  margin-top: 16px;
  font-size: 13px;
}

.password-requirements h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.password-requirements ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  color: var(--muted);
}

.password-requirements li {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;
  font-size: 13px;
}

.password-requirements .requirement {
  color: #6b7280;
}

.password-requirements .requirement.valid {
  color: #059669;
  font-weight: 500;
}

.password-requirements .req-check {
  min-width: 18px;
  font-size: 14px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.password-requirements .requirement.valid .req-check {
  opacity: 1;
  color: #059669;
}

.password-requirements .requirement.valid .req-check::before {
  content: '✓';
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #166534;
  font-size: 32px;
}

@media (max-width: 640px) {
  .modal-content {
    padding: 24px;
  }
  
  .reset-password-card {
    padding: 28px 24px;
  }
}