@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ─── CSS Variables ─────────────────────────────────────────────────────── */
:root {
  --color-primary:          #FF6621;
  --color-primary-dark:     #E5571A;
  --color-primary-light:    #FF8950;
  --color-accent:           #FFB020;
  --color-white:            #FFFFFF;
  --color-black:            #0A0A0B;
  --color-surface:          #F8F8FA;
  --color-surface-overlay:  #F2F2F5;
  --color-border:           #E8E8EF;
  --color-border-strong:    #D0D0DD;
  --color-text-primary:     #0A0A0B;
  --color-text-secondary:   #5C5C6B;
  --color-text-muted:       #9898A8;
  --color-success:          #1DB954;
  --color-warning:          #FFB020;
  --color-danger:           #E53535;
  --color-info:             #3B82F6;

  --font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;
  --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --space-8: 32px; --space-10: 40px;

  --radius-sm: 4px; --radius-md: 8px;  --radius-lg: 12px;
  --radius-xl: 16px; --radius-2xl: 24px; --radius-full: 9999px;

  --shadow-sm:  0 1px 2px rgba(10,10,11,.06), 0 1px 3px rgba(10,10,11,.04);
  --shadow-md:  0 4px 6px rgba(10,10,11,.06), 0 2px 4px rgba(10,10,11,.04);
  --shadow-lg:  0 10px 15px rgba(10,10,11,.08), 0 4px 6px rgba(10,10,11,.05);
  --shadow-xl:  0 20px 40px rgba(10,10,11,.08), 0 8px 16px rgba(10,10,11,.04);
  --shadow-glow-primary: 0 0 0 3px rgba(255,102,33,.18);

  --ease-out:    cubic-bezier(0.0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:   150ms;
  --duration-normal: 250ms;
  --duration-slow:   400ms;
}

/* ─── Keyframes ─────────────────────────────────────────────────────────── */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Strict Font & Reset ────────────────────────────────────────────────── */
.whoiscrm-auth-page,
.whoiscrm-auth-page *,
.whoiscrm-auth-page *::before,
.whoiscrm-auth-page *::after,
.whoiscrm-auth-page input,
.whoiscrm-auth-page button,
.whoiscrm-auth-page select,
.whoiscrm-auth-page textarea,
.whoiscrm-auth-page h1,
.whoiscrm-auth-page h2,
.whoiscrm-auth-page h3,
.whoiscrm-auth-page h4,
.whoiscrm-auth-page p,
.whoiscrm-auth-page label,
.whoiscrm-auth-page span,
.whoiscrm-auth-page a,
.whoiscrm-auth-page div,
.whoiscrm-auth-page li {
  box-sizing: border-box;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* ─── Page Container — Centered ─────────────────────────────────────────── */
.whoiscrm-auth-page {
  min-height: 80vh;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: var(--space-8) var(--space-4);
  background: var(--color-surface) !important;
}

/* ─── Centered Auth Card ─────────────────────────────────────────────────── */
.whoiscrm-auth-card {
  width: 440px !important;
  flex: 0 0 440px !important;
  max-width: calc(100vw - 32px) !important;
  box-sizing: border-box !important;
  background: var(--color-white) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 20px !important;
  box-shadow: var(--shadow-xl) !important;
  padding: 40px 36px !important;
  margin: 0 auto !important;
  animation: scaleIn var(--duration-slow) var(--ease-out) both;
  position: relative;
}

/* ─── Form Heading ──────────────────────────────────────────────────────── */
.whoiscrm-auth-heading {
  text-align: center;
  margin-bottom: var(--space-6);
}
.whoiscrm-auth-heading h1 {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: var(--color-text-primary) !important;
  margin: 0 0 var(--space-1) !important;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.whoiscrm-auth-heading p {
  font-size: 0.9rem !important;
  color: var(--color-text-muted) !important;
  margin: 0 !important;
  font-weight: 400 !important;
}

/* ─── Alert / Message Box ───────────────────────────────────────────────── */
.whoiscrm-auth-message {
  display: none;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  margin-bottom: var(--space-5);
  animation: fadeIn var(--duration-fast) var(--ease-out);
  border: 1px solid transparent;
  line-height: 1.5;
}
.whoiscrm-auth-message.is-error {
  display: flex;
  background: rgba(229,53,53,.07) !important;
  border-color: rgba(229,53,53,.25) !important;
  color: #C42B2B !important;
}
.whoiscrm-auth-message.is-success {
  display: flex;
  background: rgba(29,185,84,.07) !important;
  border-color: rgba(29,185,84,.25) !important;
  color: #14803C !important;
}

/* ─── Form Groups ────────────────────────────────────────────────────────── */
.whoiscrm-auth-form .whoiscrm-form-group {
  margin-bottom: var(--space-4);
}

.whoiscrm-auth-form label {
  display: block;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: var(--color-text-primary) !important;
  margin-bottom: 6px !important;
  letter-spacing: 0.01em;
}
.whoiscrm-auth-form label .required {
  color: var(--color-primary) !important;
  margin-left: 2px;
}
.whoiscrm-auth-form label .optional {
  font-size: 0.75rem !important;
  font-weight: 400 !important;
  color: var(--color-text-muted) !important;
  margin-left: 4px;
}

/* ─── Input with icon ────────────────────────────────────────────────────── */
.whoiscrm-input-icon-wrapper {
  position: relative;
  width: 100%;
}
.whoiscrm-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  pointer-events: none;
  transition: color var(--duration-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.whoiscrm-input-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}
.whoiscrm-input-icon-wrapper:focus-within .whoiscrm-input-icon {
  color: var(--color-primary);
}

.whoiscrm-auth-form input[type="email"],
.whoiscrm-auth-form input[type="password"],
.whoiscrm-auth-form input[type="text"] {
  width: 100% !important;
  height: 44px !important;
  background: var(--color-surface) !important;
  border: 1.5px solid var(--color-border) !important;
  border-radius: var(--radius-md) !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.9375rem !important;
  color: var(--color-text-primary) !important;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out),
              background var(--duration-fast);
  outline: none !important;
  padding: 0 var(--space-4) !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}

.whoiscrm-input-icon-wrapper input[type="email"],
.whoiscrm-input-icon-wrapper input[type="password"],
.whoiscrm-input-icon-wrapper input[type="text"] {
  padding-left: 38px !important;
}

.whoiscrm-auth-form input:focus {
  border-color: var(--color-primary) !important;
  background: var(--color-white) !important;
  box-shadow: var(--shadow-glow-primary) !important;
}
.whoiscrm-auth-form input::placeholder {
  color: var(--color-text-muted) !important;
  font-weight: 400 !important;
}

/* Two-column row (first + last name) */
.whoiscrm-auth-form .form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

/* ─── Password wrapper & toggle button ──────────────────────────────────── */
.whoiscrm-password-wrapper {
  position: relative;
  width: 100%;
}
.whoiscrm-password-wrapper input {
  padding-right: 42px !important;
}

.whoiscrm-password-toggle,
.whoiscrm-auth-page button.whoiscrm-password-toggle {
  position: absolute !important;
  right: 3px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 38px !important;
  height: 38px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
  color: var(--color-text-muted) !important;
  border-radius: var(--radius-sm) !important;
  transition: color var(--duration-fast) var(--ease-out),
              background var(--duration-fast);
  padding: 0 !important;
  margin: 0 !important;
}
.whoiscrm-password-toggle:hover {
  color: var(--color-primary) !important;
  background: rgba(255,102,33,.06) !important;
}
.whoiscrm-password-toggle svg {
  width: 16px !important;
  height: 16px !important;
  stroke: currentColor !important;
  fill: none !important;
  stroke-width: 2 !important;
}

/* ─── Remember Me + Forgot Row ──────────────────────────────────────────── */
.whoiscrm-form-row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  margin-top: -var(--space-1);
}

.whoiscrm-checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8375rem !important;
  color: var(--color-text-secondary) !important;
  cursor: pointer;
  user-select: none;
  font-weight: 400 !important;
}

.whoiscrm-checkbox-label input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 16px !important;
  height: 16px !important;
  border: 1.5px solid var(--color-border-strong) !important;
  border-radius: 4px !important;
  cursor: pointer;
  background: var(--color-white) !important;
  flex-shrink: 0;
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  transition: border-color var(--duration-fast), background var(--duration-fast);
}
.whoiscrm-checkbox-label input[type="checkbox"]:checked {
  background: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}
.whoiscrm-checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 1px;
  width: 8px;
  height: 5px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg);
}

.whoiscrm-auth-link {
  font-size: 0.8375rem !important;
  color: var(--color-primary) !important;
  text-decoration: none;
  font-weight: 500 !important;
  transition: color var(--duration-fast) var(--ease-out);
}
.whoiscrm-auth-link:hover {
  color: var(--color-primary-dark) !important;
  text-decoration: underline;
}

/* ─── Submit Button — STRICT WHITE TEXT ─────────────────────────────────── */
.whoiscrm-btn-auth,
.whoiscrm-auth-page button.whoiscrm-btn-auth,
.whoiscrm-auth-page button[type="submit"].whoiscrm-btn-auth {
  width: 100% !important;
  height: 48px !important;
  background: linear-gradient(135deg, #FF6621 0%, #E5571A 100%) !important;
  color: #FFFFFF !important;
  border: none !important;
  outline: none !important;
  border-radius: var(--radius-md) !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--space-2) !important;
  letter-spacing: 0.01em;
  transition:
    filter var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    transform 80ms var(--ease-out);
  margin-top: var(--space-2) !important;
  box-shadow: 0 4px 14px rgba(255,102,33,.35) !important;
  position: relative;
  overflow: hidden;
}

.whoiscrm-btn-auth .btn-text,
.whoiscrm-auth-page .whoiscrm-btn-auth .btn-text {
  color: #FFFFFF !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.01em !important;
}

.whoiscrm-btn-auth:hover {
  filter: brightness(1.06) !important;
  box-shadow: 0 6px 18px rgba(255,102,33,.45) !important;
  transform: translateY(-1px) !important;
  color: #FFFFFF !important;
}
.whoiscrm-btn-auth:active {
  transform: translateY(0) scale(0.99) !important;
}
.whoiscrm-btn-auth:disabled,
.whoiscrm-btn-auth.is-loading {
  opacity: 0.75 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* Spinner */
.whoiscrm-btn-auth .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.30);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: none;
  flex-shrink: 0;
}
.whoiscrm-btn-auth.is-loading .spinner { display: block !important; }
.whoiscrm-btn-auth.is-loading .btn-text { display: none !important; }

/* ─── Auth Footer ────────────────────────────────────────────────────────── */
.whoiscrm-auth-footer {
  margin-top: var(--space-5);
  text-align: center;
  font-size: 0.875rem !important;
  color: var(--color-text-muted) !important;
}
.whoiscrm-auth-footer a {
  color: var(--color-primary) !important;
  font-weight: 600 !important;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
.whoiscrm-auth-footer a:hover {
  color: var(--color-primary-dark) !important;
  text-decoration: underline;
}

/* ─── Password Strength Bar ──────────────────────────────────────────────── */
.whoiscrm-password-strength {
  margin-top: var(--space-2);
  height: 3px;
  border-radius: var(--radius-full);
  background: transparent;
  overflow: hidden;
  transition: background var(--duration-fast);
}
.whoiscrm-password-strength.is-active,
.whoiscrm-password-strength:has(.strength-1),
.whoiscrm-password-strength:has(.strength-2),
.whoiscrm-password-strength:has(.strength-3),
.whoiscrm-password-strength:has(.strength-4) {
  background: var(--color-border);
}

.whoiscrm-password-strength__bar {
  height: 100%;
  border-radius: var(--radius-full);
  width: 0%;
  transition: width var(--duration-normal) var(--ease-out),
              background-color var(--duration-fast) var(--ease-out);
}
.whoiscrm-password-strength__bar.strength-1 { width: 25%; background: var(--color-danger); }
.whoiscrm-password-strength__bar.strength-2 { width: 50%; background: var(--color-warning); }
.whoiscrm-password-strength__bar.strength-3 { width: 75%; background: var(--color-accent); }
.whoiscrm-password-strength__bar.strength-4 { width: 100%; background: var(--color-success); }

.whoiscrm-password-strength__label {
  font-size: 0.75rem !important;
  color: var(--color-text-muted) !important;
  margin-top: var(--space-1);
  font-weight: 500 !important;
}
.whoiscrm-password-strength__label:empty {
  display: none;
}

/* ─── Back link ──────────────────────────────────────────────────────────── */
.whoiscrm-auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem !important;
  color: var(--color-text-muted) !important;
  text-decoration: none;
  font-weight: 500 !important;
  margin-bottom: var(--space-4);
  transition: color var(--duration-fast);
}
.whoiscrm-auth-back:hover { color: var(--color-primary) !important; }
.whoiscrm-auth-back svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 2;
}

/* ─── Responsive — Mobile & Tablet ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .whoiscrm-auth-page {
    min-height: auto !important;
    align-items: flex-start !important;
    padding: 16px 12px 32px !important;
  }
  .whoiscrm-auth-card {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    padding: 28px 20px !important;
    border-radius: 16px !important;
    margin-top: 8px !important;
    box-shadow: 0 10px 25px rgba(10,10,11,0.06) !important;
  }
  .whoiscrm-auth-form .form-row-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ─── Navigation Menu Shortcode [whoiscrm_nav_menu] ─────────────────────── */
.whoiscrm-nav-guest-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.whoiscrm-nav-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 9px 22px !important;
  border-radius: 10px !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: all 200ms cubic-bezier(0.4,0,0.2,1) !important;
  line-height: 1.2 !important;
  cursor: pointer !important;
}

.whoiscrm-nav-btn--login {
  background: linear-gradient(135deg, #FF6621 0%, #E5571A 100%) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(255,102,33,0.25) !important;
}
.whoiscrm-nav-btn--login:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(255,102,33,0.40) !important;
  color: #FFFFFF !important;
}

.whoiscrm-nav-btn--signup {
  background: transparent !important;
  color: #FF6621 !important;
  border: 1.5px solid #FF6621 !important;
}
.whoiscrm-nav-btn--signup:hover {
  background: rgba(255,102,33,0.08) !important;
  transform: translateY(-2px) !important;
  color: #FF6621 !important;
}

/* User Logged-in State */
.whoiscrm-nav-user-wrap {
  position: relative !important;
  display: inline-block !important;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.whoiscrm-user-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 5px 14px 5px 6px !important;
  background: #FFFFFF !important;
  border: 1.5px solid #E8E8EF !important;
  border-radius: 9999px !important;
  cursor: pointer !important;
  transition: all 200ms ease-out !important;
  box-shadow: 0 2px 6px rgba(10,10,11,0.04) !important;
  color: #0A0A0B !important;
}

.whoiscrm-user-chip:hover,
.whoiscrm-nav-user-wrap.is-open .whoiscrm-user-chip {
  border-color: #FF6621 !important;
  box-shadow: 0 6px 16px rgba(10,10,11,0.08) !important;
}

.whoiscrm-user-avatar {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 1.5px solid #FF6621 !important;
}

.whoiscrm-user-name {
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  color: #0A0A0B !important;
  white-space: nowrap !important;
}

.whoiscrm-user-chevron {
  width: 14px !important;
  height: 14px !important;
  stroke: #5C5C6B !important;
  fill: none !important;
  stroke-width: 2.5 !important;
  transition: transform 200ms ease-out !important;
}
.whoiscrm-nav-user-wrap.is-open .whoiscrm-user-chevron {
  transform: rotate(180deg) !important;
}

/* Floating Dropdown Card */
.whoiscrm-user-dropdown {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  width: 260px !important;
  background: #FFFFFF !important;
  border: 1.5px solid #E8E8EF !important;
  border-radius: 20px !important;
  padding: 16px !important;
  box-shadow: 0 16px 40px rgba(10,10,11,0.12) !important;
  z-index: 99999 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(12px) scale(0.96) !important;
  transition: opacity 220ms ease-out, transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1), visibility 220ms !important;
  pointer-events: none !important;
}

.whoiscrm-nav-user-wrap.is-open .whoiscrm-user-dropdown {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) scale(1) !important;
  pointer-events: auto !important;
}

.whoiscrm-user-dropdown-header {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 4px 4px 12px 4px !important;
}

.whoiscrm-user-dropdown-avatar {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid #FF6621 !important;
  flex-shrink: 0 !important;
}

.whoiscrm-user-dropdown-name {
  font-size: 0.9375rem !important;
  font-weight: 800 !important;
  color: #0A0A0B !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.whoiscrm-user-dropdown-email {
  font-size: 0.75rem !important;
  color: #9898A8 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin-top: 2px !important;
}

.whoiscrm-user-dropdown-divider {
  height: 1px !important;
  background: #E8E8EF !important;
  margin: 8px -16px !important;
}

.whoiscrm-user-dropdown-menu {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  padding-top: 4px !important;
}

.whoiscrm-user-dropdown-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: #5C5C6B !important;
  text-decoration: none !important;
  transition: all 150ms ease-out !important;
}

.whoiscrm-user-dropdown-item svg {
  width: 18px !important;
  height: 18px !important;
  stroke: #9898A8 !important;
  fill: none !important;
  stroke-width: 2 !important;
  transition: stroke 150ms ease-out !important;
  flex-shrink: 0 !important;
}

.whoiscrm-user-dropdown-item:hover {
  background: rgba(255,102,33,0.08) !important;
  color: #FF6621 !important;
}
.whoiscrm-user-dropdown-item:hover svg {
  stroke: #FF6621 !important;
}

.whoiscrm-user-dropdown-item--logout:hover {
  background: rgba(229,53,53,0.08) !important;
  color: #E53535 !important;
}
.whoiscrm-user-dropdown-item--logout:hover svg {
  stroke: #E53535 !important;
}

@media (max-width: 480px) {
  .whoiscrm-user-name {
    display: none !important;
  }
  .whoiscrm-user-chip {
    padding: 4px !important;
  }
}

