/* Shared Wafi auth UI (login / register / forgot / reset) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+Bengali:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

#lpx-wrapper,
.lpx-content,
#lpx-wrapper .card,
#lpx-wrapper .card-body { all: unset !important; display: contents !important; }

:root {
  --su-brand: #4B5B9B;
  --su-brand-h: #3E4C86;
  --su-brand-50: #F3F4FA;
  --su-brand-100: #E1E4F2;
  --su-brand-600: #3E4C86;
  --su-accent: #FF6648;
  --su-accent-ink: #D9442A;
  --su-accent-ink-h: #B93A23;
  --su-ink-900: #0B1020;
  --su-ink-800: #161D33;
  --su-ink-700: #2A3142;
  --su-ink-600: #404758;
  --su-ink-500: #5C6477;
  --su-ink-400: #828A9C;
  --su-bg: #FFFFFF;
  --su-surface: #F6F7FB;
  --su-border: rgba(11,16,32,.10);
  --su-border-strong: rgba(11,16,32,.16);
  --su-danger: #DC2626;
  --su-radius-sm: 6px;
  --su-radius-md: 10px;
  --su-shadow-md: 0 4px 12px rgba(11,16,32,.06), 0 2px 4px rgba(11,16,32,.04);
  --su-ease: cubic-bezier(.22,1,.36,1);
}

html, body {
  height: 100%;
  font-family: 'Inter', 'Noto Sans Bengali', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body, body.abp-empty-layout {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--su-ink-900);
  background: var(--su-bg) !important;
  overflow-x: hidden;
}

.su-grid {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1fr);
  min-height: 100vh;
}

.su-brand {
  position: relative;
  overflow: hidden;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  background: var(--su-brand);
  color: #fff;
}

.su-panel-content { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.su-brand-logo { margin: 0; }
/* The two-tone logo knocked out to white so it reads on the indigo panel */
.su-brand-logo-img { height: 30px; width: auto; display: block; object-fit: contain; filter: brightness(0) invert(1); }
.su-brand-heading {
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -.035em;
  font-weight: 800;
  color: #fff;
  margin: 0;
  max-width: 12ch;
}
/* "Sell. Manage. Grow." — oversized type stack on the main entry pages */
/* "Sell. Manage. Grow." — sized from the panel's own width (cqw) so it is as big as it can be
   without ever overflowing; the clamp() line is the fallback for browsers without container units. */
.su-brand { container-type: inline-size; }
.su-brand-stack {
  font-size: clamp(48px, 7.4vw, 112px);
  font-size: min(17cqw, 120px);
  line-height: .92; letter-spacing: -.045em; font-weight: 900;
}
/* Each word rises out from behind its own line mask, one after another. */
.su-line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.su-word {
  display: inline-block;
  transform: translateY(110%);
  will-change: transform;
  animation: suRise 1s cubic-bezier(.16,1,.3,1) var(--d, .1s) forwards;
}
.su-line:nth-child(2) .su-word { --d: .24s; }
.su-line:nth-child(3) .su-word { --d: .38s; }
/* "Grow." — coral, with the logo's sparkle popping in beside it. Only transform/opacity are animated
   (compositor-only), so nothing repaints per frame. */
.su-brand-stack .su-grow { position: relative; color: var(--su-accent); }
.su-brand-stack .su-grow::after {
  content: ""; position: absolute; right: -.42em; top: .04em;
  width: .34em; height: .34em;
  background: var(--su-accent);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  transform: scale(0) rotate(-90deg);
  will-change: transform;
  animation: suStar .7s cubic-bezier(.34,1.56,.64,1) 1.15s forwards, suPulse 3.6s ease-in-out 2.1s infinite;
}
.su-brand-foot { animation: suFade .9s ease 1.1s both; }
.su-brand-heading:not(.su-brand-stack) { animation: suFade .8s cubic-bezier(.22,1,.36,1) .1s both; }

/* One large, very faint copy of the logo mark in the corner — gives the panel an anchor without adding content. */
.su-brand-mark {
  position: absolute; right: -9cqw; bottom: -6cqw;
  width: 78cqw; height: auto;
  fill: #fff; opacity: .07;
  pointer-events: none;
  will-change: transform;
  animation: suFloat 12s ease-in-out infinite;
}
@keyframes suFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

@keyframes suRise  { to { transform: none; } }
@keyframes suStar  { to { transform: scale(1) rotate(0); } }
@keyframes suPulse { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.2) rotate(20deg); } }
@keyframes suFade  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .su-word, .su-brand-stack .su-grow, .su-brand-stack .su-grow::after,
  .su-brand-foot, .su-brand-heading { animation: none !important; opacity: 1 !important; transform: none !important; }
}
.su-brand-foot { font-size: 14px; font-weight: 500; color: rgba(255,255,255,.68); line-height: 1.6; max-width: 40ch; margin: 0; }

.su-form-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 76px 32px 48px;
  background: var(--su-surface);
}
.su-form-wrap {
  width: 100%; max-width: 600px;
  background: var(--su-bg);
  border: 1px solid var(--su-border);
  border-radius: 16px;
  padding: 52px 52px 44px;
  box-shadow: 0 12px 40px rgba(43,53,102,.08);
}

.su-topbar { position: absolute; top: 24px; left: 32px; right: 32px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0; }
.su-topbar > *:only-child { margin-left: auto; }

.su-lang { display: flex; align-items: center; gap: 6px; color: var(--su-ink-400); font-size: 13px; }
.su-lang-btn.btn, .su-lang-btn {
  font-size: 13px !important;
  color: var(--su-accent-ink) !important;
  font-weight: 600 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  text-decoration: none !important;
}
.su-lang-btn.btn:hover { color: var(--su-accent-ink-h) !important; }

.su-head { margin-bottom: 34px; }
.su-title { font-size: 32px; line-height: 1.2; letter-spacing: -.02em; font-weight: 700; color: var(--su-ink-900); margin: 0 0 8px; }
.su-sub { font-size: 16px; line-height: 1.55; color: var(--su-ink-500); margin: 0; }
.su-req { color: var(--su-accent); font-weight: 600; margin-left: 2px; }

.su-alert { display: flex; align-items: flex-start; gap: 10px; border-radius: var(--su-radius-md); padding: 11px 14px; font-size: 13.5px; line-height: 1.55; margin-bottom: 18px; }
.su-alert:empty { display: none; }
.su-alert svg { flex-shrink: 0; margin-top: 2px; }
.su-alert-error { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.su-alert-warn  { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }
.su-alert-ok    { background: #ECFDF5; border: 1px solid #BBF7D0; color: #166534; }

.su-form { display: block; }
.su-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.su-field label { font-size: 13px; font-weight: 600; color: var(--su-ink-700); }

.su-input-wrap { position: relative; display: flex; align-items: center; }
.su-lead-ico {
  position: absolute; left: 13px;
  display: flex; align-items: center; justify-content: center;
  color: var(--su-ink-400); pointer-events: none;
}
.su-lead-ico svg { width: 16px; height: 16px; }
.su-ipt {
  width: 100%;
  font-family: inherit;
  font-size: 15.5px;
  color: var(--su-ink-900);
  background: #fff;
  border: 1px solid var(--su-border);
  border-radius: var(--su-radius-md);
  padding: 15px 16px 15px 40px;
  line-height: 1.4;
  outline: none;
  transition: border-color .15s var(--su-ease), box-shadow .15s var(--su-ease);
}
.su-ipt.su-ipt-pw { padding-right: 44px; }
.su-ipt::placeholder { color: var(--su-ink-400); }
.su-ipt:hover:not(:focus) { border-color: var(--su-border-strong); }
.su-ipt:focus { border-color: var(--su-brand); box-shadow: 0 0 0 3px rgba(75,91,155,.18); }
.su-input-wrap:focus-within .su-lead-ico { color: var(--su-brand); }

.su-pw-toggle {
  position: absolute; right: 10px;
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border: 0; background: transparent;
  color: var(--su-ink-400); cursor: pointer;
  font-size: 16px; line-height: 1;
  border-radius: var(--su-radius-sm);
}
.su-pw-toggle:hover { color: var(--su-ink-600); }

.su-error { font-size: 12px; font-weight: 500; color: var(--su-danger); }
.su-error:empty { display: none; }
/* Validation messages carry no class= of ours on purpose. ASP.NET Core's validation tag
   helper builds its own class attribute and clobbers whatever we set, rendering the
   literal string "Microsoft.AspNetCore.Mvc.TagHelpers.TagHelperOutputExtensions+
   ClassAttributeHtmlContent" into the markup as a class name. That silently dropped the
   .su-error rules above; worse, it put the token "Microsoft" in the DOM of a page with a password
   field on a non-Microsoft domain, which is a brand-impersonation signal to the
   anti-phishing classifiers that flagged this deployment. So style by the data attribute
   the tag helper does emit reliably. */
[data-valmsg-for] { font-size: 12px; font-weight: 500; color: var(--su-danger); }
[data-valmsg-for]:empty { display: none; }
.field-validation-error { display: block; font-size: 12px; font-weight: 500; color: var(--su-danger); }
.input-validation-error { border-color: var(--su-danger) !important; box-shadow: 0 0 0 3px rgba(220,38,38,.14) !important; }

.su-primary-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  margin-top: 8px;
  font-family: inherit; font-size: 16px; font-weight: 600;
  color: #fff;
  background: var(--su-brand);
  border: 0; border-radius: var(--su-radius-md);
  padding: 17px 24px;
  cursor: pointer;
  box-shadow: var(--su-shadow-md);
  transition: background .15s var(--su-ease);
}
.su-primary-btn:hover { background: var(--su-brand-h); color: #fff; }
.su-primary-btn:disabled { opacity: .6; cursor: not-allowed; }

.su-outline-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  margin-top: 10px;
  font-family: inherit; font-size: 15px; font-weight: 600;
  color: var(--su-ink-600);
  background: transparent;
  border: 1px solid var(--su-border-strong);
  border-radius: var(--su-radius-md);
  padding: 13px 24px;
  cursor: pointer;
  text-decoration: none;
}
.su-outline-btn:hover { border-color: var(--su-ink-400); color: var(--su-ink-800); background: #FAFAFB; }

.su-signin { font-size: 14.5px; color: var(--su-ink-500); text-align: center; margin: 24px 0 0; }
.su-signin a { color: var(--su-accent-ink); font-weight: 600; text-decoration: none; }
.su-signin a:hover { color: var(--su-accent-ink-h); text-decoration: underline; }
.su-foot { font-size: 12.5px; color: var(--su-ink-400); text-align: center; margin: 22px 0 0; }

@media (max-width: 900px) {
  .su-grid { grid-template-columns: 1fr; }
  .su-brand { display: none !important; }
  .su-form-panel { padding: 72px 24px 40px; align-items: flex-start; }
}
@media (max-width: 520px) {
  .su-form-panel { padding: 64px 18px 32px; }
  .su-form-wrap { padding: 28px 20px 24px; border-radius: 14px; }
  .su-title { font-size: 22px; }
}
