body:not(.is-authenticated) .b24-wrap,
body:not(.is-authenticated) #app-shell,
body:not(.is-authenticated) #app-shell-hotzone,
body:not(.is-authenticated) .app-pane {
  visibility: hidden;
}

.ecolife-auth {
  --auth-brand: #3ddc8a;
  --auth-brand-hover: #2fc87a;
  --auth-text: #19191c;
  --auth-muted: #8a8a93;
  --auth-line: #e8e8e4;
  --auth-field: #f4f4f1;
  --auth-font: Manrope, Inter, "Open Sans", system-ui, "Segoe UI", sans-serif;

  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: var(--b24-surface, #fff);
  color: var(--auth-text);
  font-family: var(--auth-font);
  box-sizing: border-box;
}

.ecolife-auth[hidden] {
  display: none;
}

.ecolife-auth *,
.ecolife-auth *::before,
.ecolife-auth *::after {
  box-sizing: border-box;
}

.ecolife-auth__body {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  min-height: 0;
  width: 100%;
  height: 100%;
}

.ecolife-auth__hero {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background-color: var(--b24-surface, #fff);
}

.ecolife-auth__hero-copy {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  padding: 28px 32px 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  pointer-events: none;
}

.ecolife-auth__headline {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(32px, 3.4vw, 48px);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--auth-text);
}

.ecolife-auth__headline-accent {
  color: var(--auth-brand);
}

.ecolife-auth__hero picture {
  display: contents;
}

.ecolife-auth__hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right bottom;
  display: block;
  pointer-events: none;
  user-select: none;
}

.ecolife-auth__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: 32px 40px;
  background: var(--b24-surface, #fff);
  overflow: auto;
}

.ecolife-auth__card {
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ecolife-auth__title {
  margin: 0 0 6px;
  font-size: 40px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.ecolife-auth__lead {
  margin: -6px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--auth-muted);
}

.ecolife-auth__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-text);
}

.ecolife-auth__field input,
.ecolife-auth-modal__card input {
  height: 48px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--auth-field);
  color: var(--auth-text);
  font: inherit;
  font-weight: 500;
}

.ecolife-auth__field input::placeholder,
.ecolife-auth-modal__card input::placeholder {
  color: #a8a8b0;
  font-weight: 500;
}

.ecolife-auth__field input:focus,
.ecolife-auth-modal__card input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--auth-brand) 45%, #fff);
  background: var(--b24-surface, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-brand) 16%, transparent);
}

.ecolife-auth__password {
  position: relative;
  display: block;
}

.ecolife-auth__password input,
.ecolife-auth-modal__card .ecolife-auth__password input {
  width: 100%;
  padding-right: 44px;
}

.ecolife-auth button.ecolife-auth__eye,
.ecolife-auth-modal button.ecolife-auth__eye {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 36px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--auth-muted);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
}

.ecolife-auth button.ecolife-auth__eye:hover,
.ecolife-auth-modal button.ecolife-auth__eye:hover {
  background: #ebebe7;
  color: var(--auth-text);
}

.ecolife-auth button.ecolife-auth__eye[aria-pressed="true"],
.ecolife-auth-modal button.ecolife-auth__eye[aria-pressed="true"] {
  color: var(--auth-brand);
}

.ecolife-auth__eye svg {
  display: block;
}

.ecolife-auth__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
}

.ecolife-auth__remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--auth-text);
  cursor: pointer;
  user-select: none;
}

.ecolife-auth__remember input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.ecolife-auth__check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid #d4d4ce;
  background: var(--b24-surface, #fff);
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.ecolife-auth__check svg {
  display: none;
  width: 12px;
  height: 12px;
}

.ecolife-auth__remember input:checked + .ecolife-auth__check {
  background: var(--auth-brand);
  border-color: var(--auth-brand);
}

.ecolife-auth__remember input:checked + .ecolife-auth__check svg {
  display: block;
}

.ecolife-auth__remember input:focus-visible + .ecolife-auth__check {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-brand) 20%, transparent);
}

.ecolife-auth__forgot {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--auth-brand);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}

.ecolife-auth__forgot:hover {
  color: var(--auth-brand-hover);
  text-decoration: underline;
}

.ecolife-auth__error {
  margin: 0;
  min-height: 1.2em;
  font-size: 13px;
  line-height: 1.4;
  color: #c0392b;
}

.ecolife-auth__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--auth-brand);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.ecolife-auth__submit:hover {
  background: var(--auth-brand-hover);
}

.ecolife-auth__submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.ecolife-auth__alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: auto;
  padding: 4px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--auth-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.ecolife-auth__alt:hover {
  color: var(--auth-brand);
  background: transparent;
}

.ecolife-auth__fp {
  display: block;
  flex: 0 0 auto;
  color: inherit;
}

.ecolife-auth__alt:hover .ecolife-auth__fp {
  color: var(--auth-brand);
}

.ecolife-auth-modal {
  --auth-brand: #3ddc8a;
  --auth-brand-hover: #2fc87a;
  --auth-text: #19191c;
  --auth-muted: #8a8a93;
  --auth-line: #e8e8e4;
  --auth-field: #f4f4f1;
  --auth-font: Manrope, Inter, "Open Sans", system-ui, "Segoe UI", sans-serif;

  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: var(--auth-font);
}

.ecolife-auth-modal[hidden] {
  display: none;
}

.ecolife-auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
}

.ecolife-auth-modal__card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--auth-line);
  border-radius: 14px;
  background: var(--b24-surface, #fff);
  color: var(--auth-text);
  box-shadow: 0 16px 48px rgba(25, 25, 28, 0.14);
}

.ecolife-auth-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ecolife-auth-modal__head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.ecolife-auth-modal__close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--auth-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.ecolife-auth-modal__close:hover {
  background: #f0f0ed;
  color: var(--auth-text);
}

.ecolife-auth-modal__card label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.ecolife-auth-modal__card .ecolife-auth__lead {
  margin: 0;
}

.ecolife-auth-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ecolife-auth-modal__card button[type="submit"] {
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--auth-brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ecolife-auth-modal__card button[type="submit"]:hover {
  background: var(--auth-brand-hover);
}

.ecolife-auth-modal__card button[type="submit"]:disabled {
  opacity: 0.65;
  cursor: wait;
}

.ecolife-auth-modal__cancel {
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--auth-line);
  border-radius: 10px;
  background: var(--b24-surface, #fff);
  color: var(--auth-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ecolife-auth-modal__cancel:hover {
  background: #f7f7f4;
}

@media (max-width: 960px) {
  .ecolife-auth__body {
    grid-template-columns: 1fr;
  }

  .ecolife-auth__hero {
    display: none;
  }

  .ecolife-auth__panel {
    padding: 28px 22px 36px;
  }
}

@media (max-width: 560px) {
  .ecolife-auth__title {
    font-size: 32px;
  }

  .ecolife-auth__row {
    flex-direction: column;
    align-items: flex-start;
  }

  .ecolife-auth__panel {
    padding: 24px 18px 32px;
  }
}

/* ================================================================ Nocturne */
html.is-theme-nocturne .ecolife-auth {
  --auth-text: var(--noct-text, #e8eaed);
  --auth-muted: var(--noct-neutral-400, #9ca3af);
  --auth-line: var(--noct-divider, rgba(255, 255, 255, 0.12));
  --auth-field: var(--noct-header, #1c1f28);
  background: var(--noct-bg, #111318);
  color: var(--auth-text);
}

html.is-theme-nocturne .ecolife-auth__panel,
html.is-theme-nocturne .ecolife-auth__hero {
  background: var(--noct-bg, #111318);
}

html.is-theme-nocturne .ecolife-auth__field input,
html.is-theme-nocturne .ecolife-auth-modal__card input {
  background: var(--auth-field);
  color: var(--auth-text);
  border-color: var(--auth-line);
}

html.is-theme-nocturne .ecolife-auth__field input:focus,
html.is-theme-nocturne .ecolife-auth-modal__card input:focus {
  background: var(--noct-card, #1a1d24);
  border-color: color-mix(in srgb, var(--auth-brand) 45%, transparent);
}

html.is-theme-nocturne .ecolife-auth__field input::placeholder,
html.is-theme-nocturne .ecolife-auth-modal__card input::placeholder {
  color: var(--noct-neutral-500, #6b7280);
}

html.is-theme-nocturne .ecolife-auth-modal__card {
  background: var(--noct-surface, #171a21);
  color: var(--noct-text, #e8eaed);
  border-color: var(--noct-divider, rgba(255, 255, 255, 0.08));
}

html.is-theme-nocturne .ecolife-auth-modal__cancel {
  background: var(--noct-card, #1a1d24);
  color: var(--noct-text, #e8eaed);
  border-color: var(--noct-divider, rgba(255, 255, 255, 0.08));
}

html.is-theme-nocturne .ecolife-auth-modal__cancel:hover {
  background: var(--noct-hover-solid, #22262f);
}
