/**
 * UNIMART agent login — full-bleed student photo + light glass panels.
 * Type: Fraunces (display) · Manrope (UI)
 */

body.login-brand-page {
  --lb-orange: #f68b1e;
  --lb-orange-deep: #e96703;
  --lb-slate: #2c3e50;
  --lb-text: #1a1a2e;
  --lb-muted: #6b7280;
  --lb-bg: #ffffff;
  --lb-border: #e8e8e8;
  --lb-radius: 12px;
  --lb-radius-sm: 8px;
  --lb-font: var(--unimart-font-sans, "Manrope", sans-serif);
  --lb-display: var(--unimart-font-display, "Fraunces", Georgia, serif);
  background: var(--lb-slate);
  color: var(--lb-text);
  font-family: var(--lb-font);
}

body.login-brand-page .content-wrapper.full-width,
body.login-brand-page .content-wrapper.full-width .content-inner,
body.login-brand-page .content-inner {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
}

body.login-brand-page .partners-section,
body.login-brand-page .footer,
body.login-brand-page .bottom-nav,
body.login-brand-page .unimart-nav,
body.login-brand-page .mobile-category-nav,
body.login-brand-page #searchFilterBar,
body.login-brand-page .dm-fab {
  display: none !important;
}

.lb-accent {
  color: var(--lb-orange) !important;
  font-style: italic;
  font-weight: 700;
}

.login-brand {
  position: relative;
  min-height: calc(100dvh - var(--auth-header-offset, 56px));
  isolation: isolate;
  overflow: hidden;
}

.lb-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.lb-scene__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  transform: scale(1.03);
  animation: lbHeroIn 1.1s ease-out both;
  background: #2c3e50;
}

.lb-scene__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      105deg,
      rgba(44, 62, 80, 0.7) 0%,
      rgba(44, 62, 80, 0.42) 45%,
      rgba(246, 139, 30, 0.22) 100%
    ),
    linear-gradient(
      180deg,
      rgba(44, 62, 80, 0.18) 0%,
      rgba(44, 62, 80, 0.38) 100%
    );
}

.lb-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1.5rem;
  align-items: center;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: inherit;
  padding: 2rem 0;
}

.lb-brand {
  display: flex;
  align-items: center;
}

.lb-brand__copy {
  width: min(28rem, 100%);
  padding: 1.6rem 1.45rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 18px 40px rgba(26, 26, 46, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  color: #fff;
}

.lb-brand__eyebrow {
  margin: 0 0 0.65rem;
  font-family: var(--lb-font);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88) !important;
}

body.login-brand-page .lb-brand h1.lb-brand__mission,
.lb-brand__mission {
  margin: 0 0 0.65rem !important;
  font-family: var(--lb-display) !important;
  font-size: clamp(1.85rem, 3.6vw, 2.6rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.1 !important;
  max-width: 12ch;
  color: #ffffff !important;
  text-shadow: 0 2px 18px rgba(44, 62, 80, 0.28);
}

.lb-brand__welcome {
  margin: 0 0 0.55rem;
  font-size: 1.02rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95) !important;
}

.lb-brand__lead,
.lb-brand__pulse {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88) !important;
}

.lb-brand__focus-label {
  margin: 1rem 0 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55) !important;
}

.lb-focus {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lb-focus__chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: var(--lb-radius-sm);
  padding: 0.45rem 0.8rem;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lb-focus__chip:hover {
  background: rgba(255, 255, 255, 0.16);
}

.lb-focus__chip.is-selected,
.lb-focus__chip[aria-pressed="true"] {
  background: var(--lb-orange);
  border-color: var(--lb-orange);
  color: #fff;
}

.lb-auth {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.lb-auth__card {
  width: min(24.5rem, 100%);
  padding: 1.65rem 1.5rem 1.5rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 22px 50px rgba(26, 26, 46, 0.2);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

.lb-auth__brand {
  margin: 0 0 0.3rem;
  font-family: var(--lb-font);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lb-orange);
}

body.login-brand-page .lb-auth h2.lb-auth__title,
.lb-auth__title {
  margin: 0 0 0.35rem !important;
  font-family: var(--lb-display) !important;
  font-size: clamp(1.4rem, 2.4vw, 1.75rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: var(--lb-slate) !important;
}

.lb-auth__sub {
  margin: 0 0 1.2rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--lb-muted);
}

.lb-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.lb-field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lb-slate);
}

.lb-field input,
.lb-pw input {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(44, 62, 80, 0.14);
  border-radius: var(--lb-radius-sm);
  background: rgba(255, 255, 255, 0.78);
  color: var(--lb-text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.lb-field input:focus,
.lb-pw input:focus {
  outline: none;
  border-color: var(--lb-orange);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(246, 139, 30, 0.18);
}

.lb-pw {
  position: relative;
}

.lb-pw input {
  padding-right: 2.75rem;
}

.lb-pw__toggle {
  position: absolute;
  right: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--lb-muted);
  width: 2.25rem;
  height: 2.25rem;
  cursor: pointer;
  border-radius: 0.4rem;
}

.lb-form__row {
  display: flex;
  justify-content: flex-end;
  margin-top: -0.2rem;
}

.lb-forgot {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--lb-orange);
  text-decoration: none;
}

.lb-forgot:hover {
  color: var(--lb-orange-deep);
  text-decoration: underline;
}

.lb-submit {
  appearance: none;
  border: 0;
  border-radius: var(--lb-radius-sm);
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, var(--lb-orange), var(--lb-orange-deep));
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(233, 103, 3, 0.3);
  transition: background 0.15s ease, transform 0.15s ease;
}

.lb-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--lb-orange-deep), #d45a02);
  transform: translateY(-1px);
}

.lb-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.lb-footer {
  margin: 1.15rem 0 0;
  font-size: 0.9rem;
  color: var(--lb-muted);
  text-align: center;
}

.lb-footer a {
  color: var(--lb-orange);
  font-weight: 700;
  text-decoration: none;
}

.lb-footer a:hover {
  color: var(--lb-orange-deep);
  text-decoration: underline;
}

.lb-error {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: #b42318;
}

.lb-alert {
  margin: 0 0 0.9rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--lb-radius-sm);
  font-size: 0.86rem;
  line-height: 1.4;
}

.lb-alert--danger,
.lb-alert--error {
  background: #fef3f2;
  color: #b42318;
  border: 1px solid #fecdca;
}

.lb-alert--success {
  background: #ecfdf3;
  color: #027a48;
  border: 1px solid #a6f4c5;
}

.lb-alert--info,
.lb-alert--warning {
  background: rgba(245, 246, 248, 0.9);
  color: var(--lb-slate);
  border: 1px solid var(--lb-border);
}

.login-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(44, 62, 80, 0.45);
  backdrop-filter: blur(4px);
}

.login-loading-overlay[hidden] {
  display: none !important;
}

.login-loading-overlay__card {
  background: #fff;
  border-radius: 14px;
  padding: 1.45rem 1.6rem;
  text-align: center;
  box-shadow: 0 16px 40px rgba(26, 26, 46, 0.18);
  width: min(18rem, calc(100% - 2rem));
}

.login-loading-overlay__spinner {
  width: 2rem;
  height: 2rem;
  margin: 0 auto 0.85rem;
  border: 3px solid var(--lb-border);
  border-top-color: var(--lb-orange);
  border-radius: 50%;
  animation: lbSpin 0.7s linear infinite;
}

.login-loading-overlay__title {
  margin: 0 0 0.25rem;
  font-weight: 700;
  color: var(--lb-slate);
}

.login-loading-overlay__sub {
  margin: 0;
  font-size: 0.85rem;
  color: var(--lb-muted);
}

@keyframes lbHeroIn {
  from { transform: scale(1.06); opacity: 0.85; }
  to { transform: scale(1.03); opacity: 1; }
}

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

/* Tablet + phone: login form only — hide brand glass card */
@media (max-width: 900px) {
  .lb-shell {
    grid-template-columns: 1fr;
    gap: 0;
    align-content: center;
    justify-items: center;
    width: min(100%, calc(100% - 1.5rem));
    padding: 1.25rem 0 calc(1.5rem + env(safe-area-inset-bottom, 0px));
    min-height: calc(100dvh - var(--auth-header-offset, 56px));
  }

  .lb-brand {
    display: none !important;
  }

  .lb-auth {
    justify-content: center;
    width: 100%;
  }

  .lb-auth__card {
    width: min(24.5rem, 100%);
    background: rgba(255, 255, 255, 0.82);
  }

  .lb-scene__shade {
    background:
      linear-gradient(
        180deg,
        rgba(44, 62, 80, 0.2) 0%,
        rgba(44, 62, 80, 0.45) 40%,
        rgba(44, 62, 80, 0.72) 100%
      );
  }
}

/* Phone */
@media (max-width: 640px) {
  .login-brand {
    min-height: calc(100dvh - var(--auth-header-offset, 52px));
    overflow: auto;
  }

  .lb-shell {
    width: min(100%, calc(100% - 1.25rem));
    padding-top: 1rem;
  }

  .lb-auth__card {
    width: 100%;
    padding: 1.35rem 1.15rem 1.25rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
  }

  .lb-field input,
  .lb-pw input {
    font-size: 16px;
  }

  .lb-submit {
    width: 100%;
  }
}

/* Small phones */
@media (max-width: 380px) {
  .lb-shell {
    width: min(100%, calc(100% - 1rem));
  }

  .lb-auth__card {
    padding: 1.15rem 1rem 1.1rem;
    border-radius: 14px;
  }
}

.login-brand-page .lb-auth input:-webkit-autofill,
.login-brand-page .lb-auth input:-webkit-autofill:hover,
.login-brand-page .lb-auth input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.92) inset !important;
  -webkit-text-fill-color: var(--lb-text) !important;
  caret-color: var(--lb-text);
  transition: background-color 99999s ease-in-out 0s;
}
