/* Page: Login — split-screen hero + panel (ported from the dashboard preview). */

body.page-standalone {
  display: block;
  min-height: 100vh;
  overflow: hidden;
  background: #091123;
}

.login-page {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  background: #091123;
}

.login-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 52%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
}

.login-overlay {
  position: absolute;
  inset: 0;
  background: #091123;
  clip-path: polygon(47% 0%, 41% 50%, 45% 50.5%, 32% 100%, 100% 100%, 100% 0%);
  z-index: 1;
  pointer-events: none;
}

.login-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  min-width: 380px;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 48px 7% 48px 5%;
}

.login-panel-inner {
  width: 100%;
  max-width: 400px;
}

/* Brand — full logo stacked above a letter-spaced sub-label. */
.login-brand {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}

.login-logo-icon {
  height: 54px;
  width: auto;
  display: block;
}

.login-heading {
  margin-bottom: 32px;
}

.login-title {
  font-size: 30px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin: 0;
}

.login-card {
  width: 100%;
}

.field {
  margin-top: 24px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.input {
  position: relative;
}

.input input {
  width: 100%;
  height: 48px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #f1f5f9;
  color: #0f172a;
  padding: 0 16px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input input::placeholder {
  color: #94a3b8;
}

.input input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(244, 176, 0, 0.22);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  font-size: 14.5px;
}

/* Remember me — custom checkbox matching the admin page. */
.remember {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.remember input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.12s, border-color 0.12s;
}

.remember input[type="checkbox"]:hover {
  border-color: var(--gold);
}

.remember input[type="checkbox"]:checked {
  background: var(--gold);
  border-color: var(--gold);
}

.remember input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 6px;
  height: 10px;
  border: solid #091123;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.remember input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.forgot {
  color: var(--gold);
  text-decoration: none;
  font-weight: 700;
  font-size: 14.5px;
}

.forgot:hover {
  text-decoration: underline;
  filter: brightness(1.12);
}

.btn {
  margin-top: 32px;
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 10px;
  background: var(--gold);
  color: #091123;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: filter 0.15s, transform 0.04s;
  box-shadow: 0 8px 24px rgba(244, 176, 0, 0.32);
}

.btn:hover {
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(1px);
}

.login-error {
  margin-bottom: 16px;
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
}

.login-footer {
  margin-top: 36px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.6;
}

.login-contact {
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
}

.login-contact:hover {
  text-decoration: underline;
  filter: brightness(1.12);
}

/* Set password — secure account setup flow. */
.set-password-page {
  height: 100vh;
}

.set-password-page::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 52%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 10, 22, 0.08) 20%, rgba(4, 10, 22, 0.82) 100%);
}

.set-password-panel {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.set-password-panel-inner {
  max-width: 440px;
  margin: auto 0;
  padding: 20px 0;
}

.set-password-brand {
  width: fit-content;
  margin-bottom: 34px;
  border-radius: 8px;
}

.set-password-brand:focus-visible,
.set-password-footer a:focus-visible,
.set-password-primary-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.set-password-heading {
  margin-bottom: 26px;
}

.set-password-heading .login-title {
  font-size: 26px;
}

.set-password-heading--invalid {
  max-width: 360px;
  margin-bottom: 24px;
}

.set-password-heading--invalid .login-title {
  color: var(--gold);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.set-password-heading--invalid .set-password-intro {
  margin-top: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.15px;
}

.set-password-intro {
  max-width: 410px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.set-password-form-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 22px;
}

.set-password-form-error > svg {
  flex: 0 0 auto;
  margin-top: 1px;
}

.set-password-form-error p + p {
  margin-top: 4px;
}

.set-password-field {
  margin-top: 20px;
}

.set-password-field:first-of-type {
  margin-top: 0;
}

.set-password-input input {
  padding-right: 52px;
}

.password-visibility {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.password-visibility:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.07);
}

.password-visibility:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 0;
}

.password-eye--hide {
  display: none;
}

.password-visibility[aria-pressed="true"] .password-eye--show {
  display: none;
}

.password-visibility[aria-pressed="true"] .password-eye--hide {
  display: block;
}

.password-strength {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.password-strength-bar {
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease;
}

.password-strength[data-score="1"] .password-strength-bar:nth-child(-n+1) {
  background: #fb7185;
}

.password-strength[data-score="2"] .password-strength-bar:nth-child(-n+2) {
  background: #fbbf24;
}

.password-strength[data-score="3"] .password-strength-bar:nth-child(-n+3) {
  background: #a3e635;
}

.password-strength[data-score="4"] .password-strength-bar:nth-child(-n+4) {
  background: #34d399;
}

.set-password-field-help {
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 7px;
  color: var(--muted-dark);
  font-size: 11.5px;
  line-height: 1.4;
}

.password-strength-text {
  flex: 0 0 auto;
  font-weight: 700;
}

.password-strength-text[data-score="1"] { color: #fda4af; }
.password-strength-text[data-score="2"] { color: #fcd34d; }
.password-strength-text[data-score="3"] { color: #bef264; }
.password-strength-text[data-score="4"] { color: #6ee7b7; }

.password-match-text {
  min-height: 20px;
  margin: 7px 0 0;
  color: var(--muted-dark);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
}

.password-match-text.is-match {
  color: #6ee7b7;
}

.password-match-text.is-mismatch {
  color: #fda4af;
}

.set-password-submit {
  margin-top: 26px;
}

.set-password-submit:disabled {
  cursor: wait;
  filter: saturate(0.7);
  opacity: 0.78;
}

.set-password-primary-link {
  margin-top: 8px;
  text-decoration: none;
}

.set-password-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 34px;
  width: 100%;
  margin-top: 34px;
}

.set-password-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.set-password-footer a:hover {
  color: var(--gold);
}

.set-password-signature {
  display: flex;
  align-items: center;
  align-self: center;
  justify-content: center;
  gap: 22px;
  width: 100%;
}

.set-password-signature-logo {
  width: auto;
  height: 44px;
  opacity: 0.95;
}

.set-password-signature-tagline {
  color: #ffffff;
  font-family: 'Montserrat', -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 1.7px;
  text-align: left;
  text-transform: uppercase;
}

.set-password-signature-tagline span {
  color: var(--gold);
}

@media (max-width: 900px) {
  .login-hero-bg,
  .login-overlay,
  .set-password-page::before {
    display: none;
  }

  .login-panel {
    position: relative;
    width: 100%;
    min-width: 0;
    padding: 40px 24px;
  }

  .login-panel-inner {
    max-width: 100%;
  }

  .set-password-panel {
    height: 100%;
    min-height: 0;
    align-items: flex-start;
  }

  .set-password-panel-inner {
    width: min(100%, 460px);
    margin: auto;
  }
}

@media (max-width: 480px) {
  .login-panel {
    padding: 32px 20px;
  }

  .set-password-panel {
    align-items: flex-start;
  }

  .set-password-panel-inner {
    padding: 0;
  }

  .set-password-brand {
    margin-bottom: 28px;
  }

  .set-password-heading {
    margin-bottom: 24px;
  }

  .set-password-footer {
    gap: 28px;
    margin-top: 30px;
  }

  .set-password-signature {
    gap: 12px;
  }

  .set-password-signature-logo {
    height: 35px;
  }

  .set-password-signature-tagline {
    font-size: 11.5px;
    line-height: 1.55;
    letter-spacing: 1.2px;
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  .set-password-panel {
    align-items: flex-start;
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .set-password-panel-inner {
    padding: 0;
  }

  .set-password-brand {
    margin-bottom: 22px;
  }

  .set-password-heading {
    margin-bottom: 20px;
  }

  .set-password-field {
    margin-top: 16px;
  }

  .set-password-submit {
    margin-top: 20px;
  }

  .set-password-footer {
    margin-top: 22px;
  }
}
