/* SnapX Login — overrides AdminLTE .login-page flex layout on body */
body.login-page,
body.register-page {
  display: block !important;
  flex-direction: unset !important;
  align-items: unset !important;
  justify-content: unset !important;
  height: auto !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  background: #eef1f6 !important;
  margin: 0 !important;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif !important;
}

body.login-page app-root,
body.register-page app-root {
  display: block !important;
  width: 100% !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
}

body.login-page .wrapper,
body.login-page .content-wrapper {
  min-height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.snapx-auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: #eef1f6;
  width: 100%;
  box-sizing: border-box;
}

.snapx-auth-card {
  display: grid !important;
  grid-template-columns: 42fr 58fr;
  width: 100%;
  max-width: 980px;
  min-height: 620px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

/* ── Left brand panel ── */
.snapx-auth-card__brand {
  position: relative;
  padding: 2.5rem 2rem;
  background: linear-gradient(160deg, #ff3b3b 0%, #e02020 45%, #c41818 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100%;
}

.snapx-auth-card__brand::before,
.snapx-auth-card__brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.snapx-auth-card__brand::before {
  width: 280px;
  height: 280px;
  top: -80px;
  right: -60px;
}

.snapx-auth-card__brand::after {
  width: 200px;
  height: 200px;
  bottom: 18%;
  left: -60px;
}

.snapx-auth-brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 0;
}

.snapx-auth-brand__head {
  display: block;
}

.snapx-auth-brand__logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  display: block;
}

.snapx-auth-brand__welcome {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 0.25rem;
}

.snapx-auth-brand__title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  line-height: 1.15;
  color: #fff;
}

.snapx-auth-brand__tagline {
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 1.5rem;
  max-width: 300px;
}

.snapx-auth-brand__visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem 0 1.5rem;
}

.snapx-mock-dashboard {
  width: 88%;
  max-width: 260px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.75rem;
  transform: rotate(-6deg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.snapx-mock-dashboard__bar {
  height: 8px;
  width: 40%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  margin-bottom: 0.65rem;
}

.snapx-mock-dashboard__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.snapx-mock-dashboard__grid span {
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
}

.snapx-mock-dashboard__grid span.wide {
  grid-column: span 3;
  height: 52px;
}

.snapx-auth-brand__features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}

.snapx-auth-brand__feature {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

.snapx-auth-brand__feature i {
  font-size: 0.95rem;
  opacity: 0.95;
}

.snapx-auth-brand__feature strong {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.snapx-auth-brand__feature span {
  display: block;
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
}

/* ── Right form panel ── */
.snapx-auth-card__form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 3rem;
  background: #fff;
}

.snapx-login__header h2 {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 0 0 0.35rem;
}

.snapx-login__header p {
  color: #64748b;
  font-size: 0.9375rem;
  margin: 0 0 1.75rem;
}

.snapx-login__field {
  margin-bottom: 1.15rem;
}

.snapx-login__field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.45rem;
}

.snapx-field-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.snapx-field-wrap__icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.875rem;
  pointer-events: none;
  z-index: 2;
  line-height: 1;
}

.snapx-field-wrap__toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  padding: 0.35rem;
  cursor: pointer;
  z-index: 2;
  line-height: 1;
}

.snapx-login .snapx-field {
  display: block;
  width: 100%;
  height: 48px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 0 1rem 0 2.75rem;
  font-size: 0.9375rem;
  font-family: inherit;
  background: #fff;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: none;
  appearance: none;
}

.snapx-login .snapx-field--password {
  padding-right: 2.75rem;
}

.snapx-login .snapx-field:focus {
  border-color: #ff2424;
  box-shadow: 0 0 0 3px rgba(255, 36, 36, 0.12);
  outline: none;
}

.snapx-login .snapx-field::placeholder {
  color: #94a3b8;
}

.snapx-login__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 0.75rem;
}

.snapx-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  cursor: pointer;
  font-size: 0.8125rem;
  color: #64748b;
  user-select: none;
}

.snapx-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: #ff2424;
  cursor: pointer;
}

.snapx-login__forgot {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ff2424 !important;
  white-space: nowrap;
  text-decoration: none;
}

.snapx-login__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 10px;
  background: #ff2424 !important;
  color: #fff !important;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 36, 36, 0.35);
  transition: background 0.2s ease, transform 0.2s ease;
}

.snapx-login__submit:hover:not(:disabled) {
  background: #e01515 !important;
  transform: translateY(-1px);
}

.snapx-login__submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.snapx-login__divider {
  display: flex;
  align-items: center;
  margin: 1.25rem 0;
  color: #94a3b8;
  font-size: 0.8125rem;
}

.snapx-login__divider::before,
.snapx-login__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.snapx-login__divider span {
  padding: 0 0.75rem;
}

.snapx-login__google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  height: 48px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  color: #334155;
  cursor: not-allowed;
  opacity: 0.75;
}

.snapx-login__register {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
}

.snapx-auth-card__copyright {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ── Tablet ── */
@media (max-width: 1024px) {
  .snapx-auth-page {
    padding: 1.25rem;
  }

  .snapx-auth-card {
    max-width: 900px;
    min-height: 560px;
  }

  .snapx-auth-card__brand {
    padding: 2rem 1.5rem;
  }

  .snapx-auth-card__form {
    padding: 2rem;
  }

  .snapx-auth-brand__title {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .snapx-auth-page {
    align-items: flex-start;
    padding: 1rem;
  }

  .snapx-auth-card {
    grid-template-columns: 1fr !important;
    max-width: 520px;
    min-height: auto;
  }

  .snapx-auth-card__brand {
    padding: 1.5rem 1.25rem;
  }

  .snapx-auth-brand__head {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
  }

  .snapx-auth-brand__logo {
    width: 48px;
    height: 48px;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .snapx-auth-brand__title {
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
  }

  .snapx-auth-brand__tagline {
    font-size: 0.8125rem;
    margin-bottom: 0;
  }

  .snapx-auth-brand__visual {
    display: none;
  }

  .snapx-auth-brand__features {
    margin-top: 1.25rem;
  }

  .snapx-auth-card__form {
    padding: 1.75rem 1.5rem 1.25rem;
  }
}

@media (max-width: 480px) {
  body.login-page {
    background: #fff !important;
  }

  .snapx-auth-page {
    padding: 0;
    background: #fff;
  }

  .snapx-auth-card {
    max-width: none;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }

  .snapx-auth-brand__tagline {
    display: none;
  }

  .snapx-auth-brand__features {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .snapx-auth-brand__feature {
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
  }

  .snapx-auth-brand__feature i {
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
  }

  .snapx-auth-card__form {
    padding: 1.5rem 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .snapx-login__options {
    flex-direction: column;
    align-items: flex-start;
  }

  .snapx-login .snapx-field,
  .snapx-login__submit,
  .snapx-login__google {
    height: 50px;
  }
}
