/* ── RESET & BASE ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --accent: #4f46e5;
  --accent-dark: #3730a3;
  --accent-light: #6366f1;
  --green: #22c55e;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg-panel: #ffffff;
  --label-sz: 0.7rem;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

html,
body {
  height: 100%;
  font-family: "DM Sans", sans-serif;
  color: var(--text-main);
  background: var(--bg-panel);
}

/* ── SPLIT LAYOUT ── */
.split-wrapper {
  display: flex;
  min-height: 100vh;
}

/* LEFT */
.left-panel {
  width: 430px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 36px 40px 28px;
  background: var(--bg-panel);
  position: relative;
  z-index: 2;
}

/* RIGHT */
.right-panel {
  flex: 1;
  background: linear-gradient(135deg, #5b52f0 0%, #3730a3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.right-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 30% 20%,
      rgba(139, 92, 246, 0.35) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 80% 80%,
      rgba(99, 102, 241, 0.25) 0%,
      transparent 55%
    );
  pointer-events: none;
}

/* ── LOGO ── */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  text-decoration: none;
}

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.logo-text {
  font-family: "Sora", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.3px;
}

/* ── ROLE TOGGLE ── */
.role-toggle {
  display: flex;
  background: #f3f4f6;
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
  margin-bottom: 32px;
}

.toggle-btn {
  flex: 1;
  padding: 9px 0;
  border: none;
  border-radius: 6px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition:
    background 0.22s,
    color 0.22s,
    box-shadow 0.22s;
}

.toggle-btn.active {
  background: var(--bg-panel);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

/* ── FORMS ── */
.form-section {
  display: none;
}
.form-section.active {
  display: block;
}

.form-heading {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.form-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.field-group {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  font-size: var(--label-sz);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-main);
  margin-bottom: 7px;
}

.field-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: "DM Sans", sans-serif;
  font-size: 0.9rem;
  color: var(--text-main);
  background: #fff;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.field-input::placeholder {
  color: #b0b7c3;
}

.field-input:focus {
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.error-msg {
  font-size: 0.78rem;
  color: #ef4444;
  margin-top: 5px;
  min-height: 16px;
  display: block;
}

.btn-login {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: "DM Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition:
    background 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
  letter-spacing: 0.01em;
}

.btn-login:hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.28);
  transform: translateY(-1px);
}

.btn-login:active {
  transform: translateY(0);
}
.btn-login:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ── Forgot Password link beneath login button ── */
.forgot-link-wrap {
  text-align: right;
  margin-top: 10px;
}

.forgot-link {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: "DM Sans", sans-serif;
  text-decoration: none;
}

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

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

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

/* ── ADMIN LINK ── */
.admin-link {
  margin-top: auto;
  padding-top: 24px;
  font-size: 0.825rem;
  color: var(--text-muted);
  text-align: center;
}

.admin-link a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.admin-link a:hover {
  text-decoration: underline;
}

/* ── RIGHT PANEL CONTENT ── */
.right-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px;
  max-width: 560px;
}

.hero-title {
  font-family: "Sora", sans-serif;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
  max-width: 440px;
  margin: 0 auto;
}

/* ── FLOATING CARDS ── */
.float-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  color: #fff;
}

.float-card.card-rating {
  top: 13%;
  left: 10%;
  animation: floatA 5s ease-in-out infinite;
}

.float-card.card-activity {
  bottom: 18%;
  right: 8%;
  animation: floatB 5.5s ease-in-out infinite;
}

@keyframes floatA {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes floatB {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(10px);
  }
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.card-label {
  font-size: 1rem;
  font-weight: 700;
}
.card-sub {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 1px;
}

.activity-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.15);
  }
}

/* ════════════════════════════════════════════════════
       MODAL — shared base (used by Admin + Forgot Password)
    ════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 36px 36px 28px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  transform: translateY(18px) scale(0.97);
  transition:
    transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.25s;
  opacity: 0;
}

.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.modal-title {
  font-family: "Sora", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.18s;
}

.modal-close:hover {
  background: var(--border);
}

.modal-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ════════════════════════════════════════════════════
       FORGOT PASSWORD MODAL — step states
    ════════════════════════════════════════════════════ */

/* Each step hidden by default; only .fp-step.active shown */
.fp-step {
  display: none;
}
.fp-step.active {
  display: block;
}

/* Step indicator dots */
.fp-steps-indicator {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 22px;
}

.fp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.25s;
}

.fp-dot.active {
  background: var(--accent);
}
.fp-dot.done {
  background: var(--accent-light);
}

/* Success banner */
.fp-success {
  display: none;
  text-align: center;
  padding: 12px 0 4px;
}

.fp-success.visible {
  display: block;
}

.fp-success-icon {
  font-size: 2.4rem;
  margin-bottom: 10px;
}

.fp-success-title {
  font-family: "Sora", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.fp-success-msg {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* OTP input — wider, centered, letter-spaced */
.otp-input {
  letter-spacing: 0.25em;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
}

/* Back link inside modal */
.fp-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: "DM Sans", sans-serif;
  margin-bottom: 16px;
}

.fp-back-link:hover {
  color: var(--accent);
}

/* Password strength bar */
.pw-strength-bar {
  height: 4px;
  border-radius: 4px;
  background: var(--border);
  margin-top: 6px;
  overflow: hidden;
}

.pw-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition:
    width 0.3s,
    background 0.3s;
}

.pw-strength-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
  min-height: 14px;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .split-wrapper {
    flex-direction: column;
  }
  .left-panel {
    width: 100%;
    padding: 32px 28px 24px;
  }
  .right-panel {
    display: none;
  }
}

@media (max-width: 480px) {
  .left-panel {
    padding: 24px 20px 20px;
  }
  .hero-title {
    font-size: 1.6rem;
  }
  .modal-box {
    margin: 0 16px;
    padding: 28px 20px 22px;
  }
}
