/* ============================================================
   Auth Page Styles — MD Business Management
   Full blue theme · polished animations · user-friendly
   ============================================================ */

:root {
  --brand:       #1976d2;
  --brand-light: #42a5f5;
  --brand-dark:  #1565c0;
  --navy:        #0a1628;
  --navy-mid:    #0d2247;
  --text:        #0f172a;
  --muted:       #64748b;
  --card:        #ffffff;
  --ring:        rgba(25, 118, 210, 0.22);
  --border:      #e2e8f0;
  --input-bg:    #f8fafc;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

/* ── Page background ── */
body.auth-body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background: radial-gradient(ellipse 120% 60% at 50% 0%, #1a78c2 0%, #2196f3 15%, #64b5f6 35%, #bbdefb 55%, #e3f2fd 75%, #ffffff 100%);
}

/* ── Wrapper ── */
.auth-wrapper {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

/* ── Card ── */
.login-card {
  width: min(100%, 1000px);
  min-height: 540px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.40),
    0 0 0 1px rgba(255,255,255,0.10);
  animation: cardEnter 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(40px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ═══════════════════════════════
   LEFT PANEL
═══════════════════════════════ */
.login-media {
  position: relative;
  background: url('../images/auth/login-illustration.svg') center / cover no-repeat,
              linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 50%, #071428 100%);
  overflow: hidden;
}

/* animated gradient overlay */
.login-media::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    135deg,
    rgba(13, 34, 71, 0.55) 0%,
    rgba(21, 101, 192, 0.30) 50%,
    rgba(5, 13, 26, 0.70) 100%
  );
  z-index: 0;
}

/* moving shimmer stripe */
.login-media::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -40%;
  width: 80%;
  height: 200%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(66, 165, 245, 0.08) 50%,
    transparent 60%
  );
  animation: shimmer 6s ease-in-out infinite;
  z-index: 0;
}

@keyframes shimmer {
  0%   { transform: translateX(-60%) skewX(-10deg); }
  100% { transform: translateX(220%) skewX(-10deg); }
}

/* ── Floating particles canvas ── */
.particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Media overlay contents ── */
.media-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  justify-content: space-between; align-items: center;
  padding: 24px 24px 28px;
  color: #e8f4fd;
  z-index: 1;
}

/* ── Brand chip ── */
.brand-chip {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  background: rgba(255,255,255,0.10);
  color: #e8f4fd;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  backdrop-filter: blur(10px);
  animation: fadeDown 0.6s 0.3s cubic-bezier(0.22,1,0.36,1) both;
  white-space: nowrap;
}
.brand-chip svg { color: #90caf9; flex-shrink: 0; }

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Centre logo ── */
.media-center-logo {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0;
  pointer-events: none;
  animation: logoEnter 0.9s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes logoEnter {
  from { opacity: 0; transform: translateY(20px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.center-logo-img {
  width: 220px;
  filter:
    drop-shadow(0 4px 20px rgba(255, 196, 0, 0.45))
    drop-shadow(0 12px 44px rgba(66, 165, 245, 0.50));
  animation: logoPulse 4s ease-in-out infinite;
  margin-bottom: 20px;
  display: block;
}

@keyframes logoPulse {
  0%, 100% {
    filter:
      drop-shadow(0 4px 20px rgba(255, 196, 0, 0.45))
      drop-shadow(0 12px 44px rgba(66, 165, 245, 0.50));
  }
  50% {
    filter:
      drop-shadow(0 6px 28px rgba(255, 196, 0, 0.70))
      drop-shadow(0 16px 60px rgba(66, 165, 245, 0.75));
  }
}

/* tagline wrapper */
.logo-tagline-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  animation: taglineEnter 0.8s 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes taglineEnter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* thin decorative lines flanking tagline */
.tagline-rule {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  flex-shrink: 0;
}

.logo-tagline {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: transparent;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.50) 0%,
    rgba(255,255,255,0.90) 25%,
    #ffd54f 50%,
    rgba(255,255,255,0.90) 75%,
    rgba(255,255,255,0.50) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  white-space: nowrap;
  background-size: 200% auto;
  animation: taglineShimmer 5s linear infinite;
}

@keyframes taglineShimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* ── Bottom row: socials + signup ── */
.media-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: fadeUp 0.6s 0.5s cubic-bezier(0.22,1,0.36,1) both;
}
/* ── Social buttons ── */
.socials {
  display: flex; align-items: center; gap: 12px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.social-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.10);
  color: #ffffff;
  text-decoration: none; font-weight: 700; font-size: 14px;
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.social-btn:hover {
  transform: translateY(-3px) scale(1.08);
  background: rgba(255,255,255,0.22);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  color: #fff;
}
.social-btn:active { transform: scale(0.96); }

/* ── Sign-up CTA ── */
.signup-cta {
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  animation: fadeUp 0.6s 0.55s cubic-bezier(0.22,1,0.36,1) both;
}
.signup-link {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.45);
  transition: color 0.2s, border-color 0.2s;
}
.signup-link:hover { color: #bbdefb; border-color: #bbdefb; }

/* ═══════════════════════════════
   RIGHT PANEL — FORM
═══════════════════════════════ */
.login-form {
  padding: 48px 52px;
  background: var(--card);
  display: flex; flex-direction: column; justify-content: center;
  animation: formEnter 0.7s 0.15s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes formEnter {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Form header ── */
.form-header { margin-bottom: 28px; }

.form-logo {
  display: block; margin-bottom: 12px;
  animation: spinIn 0.6s 0.4s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes spinIn {
  from { opacity: 0; transform: rotate(-90deg) scale(0.5); }
  to   { opacity: 1; transform: rotate(0) scale(1); }
}

.form-header h1 {
  font-size: 28px; font-weight: 800;
  color: var(--navy); letter-spacing: -0.5px;
  line-height: 1.2;
}
.form-header p { margin-top: 6px; color: var(--muted); font-size: 14px; }

/* ── Inputs ── */
.form { margin-top: 4px; }

.input-group {
  margin-bottom: 18px;
  animation: fadeUp 0.5s cubic-bezier(0.22,1,0.36,1) both;
}
.input-group:nth-child(1) { animation-delay: 0.35s; }
.input-group:nth-child(2) { animation-delay: 0.42s; }

.input-group label {
  display: block; margin-bottom: 7px;
  font-size: 13px; font-weight: 600;
  color: #374151;
  transition: color 0.2s;
}
.input-group:focus-within label { color: var(--brand); }

.input-group input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--input-bg);
  font-size: 14px; color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.input-group input::placeholder { color: #adb5bd; }
.input-group input:hover  { border-color: #93c5fd; background: #fff; }
.input-group input:focus  {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
  background: #fff;
  transform: translateY(-1px);
}

/* ── Password field ── */
.password-field { position: relative; }
.password-field input { padding-right: 46px; }
.password-field input::-ms-reveal,
.password-field input::-ms-clear { display: none; }

.toggle-password {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent;
  color: #94a3b8; cursor: pointer;
  padding: 5px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}
.toggle-password:hover {
  color: var(--brand);
  background: rgba(25,118,210,0.08);
  transform: translateY(-50%) scale(1.15);
}

/* ── Form row ── */
.form-row {
  margin: 6px 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  animation: fadeUp 0.5s 0.48s cubic-bezier(0.22,1,0.36,1) both;
}
.checkbox {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
  font-size: 13px; color: #374151;
}
.checkbox input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }

/* ── Primary button ── */
.btn.primary {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 0.4px;
  box-shadow: 0 6px 20px rgba(25,118,210,0.38);
  position: relative; overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  animation: fadeUp 0.5s 0.52s cubic-bezier(0.22,1,0.36,1) both;
}

/* ripple pseudo-element */
.btn.primary::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(25,118,210,0.50);
  background: linear-gradient(135deg, #2196f3 0%, var(--brand) 100%);
}
.btn.primary:hover::after {
  opacity: 1;
  transform: scale(1.5);
}
.btn.primary:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(25,118,210,0.30);
}
.btn.primary:disabled {
  background: linear-gradient(135deg, #90a4ae, #78909c);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ── Links ── */
.link { color: var(--brand); text-decoration: none; font-weight: 600; font-size: 13px; }
.link:hover { text-decoration: underline; color: var(--brand-dark); }
.small { font-size: 13px; color: var(--muted); }

.terms {
  text-align: center; margin-top: 16px;
  animation: fadeUp 0.5s 0.58s cubic-bezier(0.22,1,0.36,1) both;
}
.terms a { color: var(--brand); font-weight: 500; text-decoration: none; }
.terms a:hover { text-decoration: underline; }

.back-home { display: inline-block; margin-top: 22px; color: var(--muted); text-decoration: none; }
.back-home:hover { text-decoration: underline; color: var(--navy); }

/* ── Login message ── */
.login-message {
  margin-top: 14px; padding: 11px 16px;
  border-radius: 8px; font-size: 13px; font-weight: 500;
  text-align: center;
  animation: msgIn 0.35s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.login-message.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.login-message.error   { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }

/* ═══════════════════════════════
   FORGOT PASSWORD MODAL
═══════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 22, 40, 0.65);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-content {
  background: #fff;
  border-radius: 16px; padding: 36px;
  max-width: 460px; width: 100%;
  box-shadow: 0 24px 70px rgba(0,0,0,0.25), 0 0 0 1px rgba(25,118,210,0.10);
  position: relative;
  transform: translateY(30px) scale(0.95);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), opacity 0.35s ease;
}
.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-header { margin-bottom: 22px; }
.modal-header h2 { font-size: 22px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.modal-header p  { color: var(--muted); font-size: 14px; }

.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: #f1f5f9; border: none;
  font-size: 20px; color: var(--muted); cursor: pointer;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.modal-close:hover { background: #e2e8f0; color: var(--text); transform: rotate(90deg); }

.modal-body { margin-bottom: 4px; }

/* ── Email input with send btn ── */
.email-input-wrapper { position: relative; }
.email-input-wrapper input { padding-right: 48px; }

.send-icon-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: var(--brand); border: none;
  width: 30px; height: 30px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  padding: 0;
}
.send-icon-btn:hover {
  background: var(--brand-dark);
  transform: translateY(-50%) scale(1.10);
  box-shadow: 0 4px 12px rgba(25,118,210,0.35);
}
.send-icon-btn:active { transform: translateY(-50%) scale(0.95); }
.send-icon-btn:disabled { background: #94a3b8; cursor: not-allowed; transform: translateY(-50%); }

.send-icon-btn svg { transform: rotate(45deg); transition: transform 0.2s; }
.send-icon-btn:not(:disabled):hover svg { transform: rotate(45deg) translate(2px,-2px); }

/* ═══════════════════════════════
   RESET PASSWORD CARD
═══════════════════════════════ */
.reset-password-card {
  width: min(100%, 480px);
  background: var(--card); padding: 48px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(15,23,42,0.08);
}
.reset-header { text-align: center; margin-bottom: 32px; }
.reset-header h1 { font-size: 26px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.reset-header p  { color: var(--muted); font-size: 14px; }

.password-requirements {
  background: #f8fafc; border: 1px solid var(--border);
  border-radius: 8px; padding: 14px 16px; margin-top: 14px; font-size: 13px;
}
.password-requirements h4 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.password-requirements ul { list-style: none; padding: 0; color: var(--muted); }
.password-requirements li { margin-bottom: 8px; display: flex; align-items: center; gap: 8px; font-size: 13px; transition: color 0.3s; }
.requirement        { color: #94a3b8; }
.requirement.valid  { color: #059669; font-weight: 500; }
.req-check          { min-width: 18px; font-size: 14px; font-weight: bold; opacity: 0; transition: opacity 0.3s; }
.requirement.valid .req-check          { opacity: 1; color: #059669; }
.requirement.valid .req-check::before  { content: '✓'; }

.success-icon {
  width: 64px; height: 64px; margin: 0 auto 20px;
  background: #d1fae5; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #065f46; font-size: 32px;
}

/* ═══════════════════════════════
   RESPONSIVE
═══════════════════════════════ */
@media (max-width: 860px) {
  .login-card { grid-template-columns: 1fr; }
  .login-media { display: none; }
  .login-form { padding: 36px 28px; }
}

@media (max-width: 480px) {
  .login-form { padding: 28px 20px; }
  .reset-password-card { padding: 28px 20px; }
  .modal-content { padding: 26px 20px; }
}

/* ═══════════════════════════════
   FLOATING PARTICLES  (JS-driven)
   Styles for canvas-less fallback
═══════════════════════════════ */
.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(144, 202, 249, 0.35);
  animation: floatParticle linear infinite;
  pointer-events: none;
}

@keyframes floatParticle {
  0%   { transform: translateY(100vh) scale(0.4); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-120px) scale(1); opacity: 0; }
}
