/* PPOS login — desktop card + mobile hero (no card) */
@font-face {
  font-family: lao;
  src: url('../font/NotoSerifLao-Regular.ttf');
}

.ppos-login-page *,
.ppos-login-page .the-message {
  font-family: lao, 'Noto Sans Lao', sans-serif !important;
}

body,
body.ppos-login-body,
body:has(.ppos-login-page) {
  margin: 0;
  padding: 0;
  background-color: #f8fafc;
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

.ppos-login-page {
  --ppos-cover-h: 50vh;
  --ppos-cover-h: 50dvh;
  --ppos-saas-bg: #f8fafc;
  --ppos-saas-surface: #ffffff;
  --ppos-saas-border: #e2e8f0;
  --ppos-saas-text: #0f172a;
  --ppos-saas-muted: #64748b;
  --ppos-saas-accent: #2563eb;
  --ppos-saas-accent-hover: #1d4ed8;
  --ppos-saas-radius: 14px;
  --ppos-saas-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.06);
  --ppos-brand-dots: url('../images/brand/luayver-pattern-dots.svg');
  --ppos-brand-waves: url('../images/brand/luayver-pattern-waves.svg');
  --ppos-brand-rings: url('../images/brand/luayver-pattern-rings.svg');
  --ppos-brand-diagonal: url('../images/brand/luayver-pattern-diagonal.svg');
  --ppos-brand-water: url('../images/brand/luayver-pattern-water.svg');
  --ppos-brand-water-deep: url('../images/brand/luayver-pattern-water-deep.svg');
  position: relative;
  z-index: 1;
  background-color: var(--ppos-saas-bg);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  isolation: isolate;
}

.ppos-login-split {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 100vh;
  min-height: 100dvh;
}

.ppos-login-col {
  position: relative;
  min-width: 0;
}

.ppos-login-col--form {
  order: 2;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  background:
    radial-gradient(ellipse 90% 60% at 100% 0%, rgba(37, 99, 235, 0.06), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--ppos-saas-bg) 100%);
}

.ppos-login-col--brand {
  order: 1;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: #0b1f3a;
  min-height: var(--ppos-cover-h);
}

/* SVG ລາຍພື້ນຫຼັງ — ເບົາ, ບໍ່ blur (ເຄື່ອງສະເປັກຕ່ຳ) */
.ppos-login-patterns {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ppos-login-pattern {
  position: absolute;
  display: block;
  background-repeat: repeat;
  opacity: 1;
}

.ppos-login-pattern--dots {
  inset: 0;
  background-image: var(--ppos-brand-dots);
  background-size: 48px 48px;
  opacity: 0.32;
}

.ppos-login-pattern--rings {
  width: 240px;
  height: 240px;
  top: 8%;
  right: -72px;
  background: var(--ppos-brand-rings) center / contain no-repeat;
  opacity: 0.38;
}

/* ລາຍນ້ຳພື້ນຫຼັງ — ຊັ້ນດຽວ, ຄົງທີ່ (ບໍ່ animate) */
.ppos-login-pattern--water {
  left: -5%;
  right: -5%;
  bottom: 0;
  height: 42%;
  background-image: var(--ppos-brand-water);
  background-size: 360px 120px;
  background-repeat: repeat-x;
  background-position: 0 100%;
  opacity: 0.28;
}

.ppos-brand-logo-wrap {
  position: relative;
  display: inline-block;
  margin: 0 auto 0.65rem;
}

/* —— Brand cover slideshow —— */
.ppos-brand-cover {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  height: var(--ppos-cover-h);
  min-height: 260px;
  max-height: 440px;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  border-radius: 0 0 1.35rem 1.35rem;
}

.ppos-login-col--brand .ppos-brand-cover {
  position: absolute;
  inset: 0;
  height: auto;
  min-height: 0;
  max-height: none;
  border-radius: 0 0 1.35rem 1.35rem;
}

.ppos-brand-cover-track {
  position: absolute;
  inset: 0;
}

.ppos-brand-cover-slide {
  position: absolute;
  inset: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.04);
  z-index: 0;
  will-change: opacity, transform;
  pointer-events: none;
}

/* Cartoon brand SVG — ທີມ + ກະຕ່າ Luay Ver */
.ppos-brand-cover-slide--cartoon {
  background-position: center center;
  background-size: cover;
}

.ppos-brand-cover-slide--cartoon.is-active {
  animation: pposBrandKenCartoon 11s ease-out forwards;
}

/* ຮູບຄົນ (FB) — crop ໂຟກັດຄົນ + ໂທນ brand */
.ppos-brand-cover-slide--people {
  background-position: center 30%;
  background-size: cover;
}

.ppos-brand-cover-slide--full {
  background-position: top center;
  background-size: 100%;
  background-color: #0b2f72;
}

.ppos-brand-cover-slide--people::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(13, 71, 161, 0.12) 0%,
    rgba(25, 118, 210, 0.08) 40%,
    rgba(11, 31, 58, 0.35) 100%
  );
  opacity: 0.92;
  pointer-events: none;
}

.ppos-brand-cover-slide--people.is-active {
  animation: pposBrandKenPeople 10s ease-out forwards;
}

.ppos-brand-cover-slide--full.is-active {
  animation: pposBrandKenFull 10s ease-out forwards;
}

/* ຢູ່ກາງຈໍ + zoom ເບົາ */
.ppos-brand-cover-slide.is-active {
  opacity: 1;
  z-index: 1;
  transform: scale(1.04);
  animation: pposBrandCoverKen 9s ease-out forwards;
}

.ppos-brand-cover-slide--people.is-active {
  animation: pposBrandKenPeople 10s ease-out forwards;
}

/* ອອກ: fade out */
.ppos-brand-cover-slide.is-leaving-left {
  z-index: 2;
  animation: pposCoverFadeOut 0.95s ease forwards;
}

/* ເຂົ້າ: fade in */
.ppos-brand-cover-slide.is-entering-from-right {
  z-index: 1;
  animation: pposCoverFadeIn 0.95s ease forwards;
}

/* ອອກ: fade out */
.ppos-brand-cover-slide.is-leaving-right {
  z-index: 2;
  animation: pposCoverFadeOut 0.95s ease forwards;
}

/* ເຂົ້າ: fade in */
.ppos-brand-cover-slide.is-entering-from-left {
  z-index: 1;
  animation: pposCoverFadeIn 0.95s ease forwards;
}

@keyframes pposCoverFadeOut {
  from {
    opacity: 1;
    transform: scale(1.04);
  }
  to {
    opacity: 0;
    transform: scale(1.07);
  }
}

@keyframes pposCoverFadeIn {
  from {
    opacity: 0;
    transform: scale(1.01);
  }
  to {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes pposBrandCoverKen {
  from { transform: scale(1.04); }
  to { transform: scale(1.08); }
}

@keyframes pposBrandKenPeople {
  0% {
    transform: scale(1.06);
    background-position: center 24%;
  }
  50% {
    transform: scale(1.1);
    background-position: center 36%;
  }
  100% {
    transform: scale(1.08);
    background-position: center 30%;
  }
}

@keyframes pposBrandKenCartoon {
  0% {
    transform: translateX(0) scale(1.05);
    background-position: center 48%;
  }
  100% {
    transform: translateX(0) scale(1.1);
    background-position: center 52%;
  }
}

@keyframes pposBrandKenFull {
  0% {
    transform: scale(1);
    background-position: center top;
  }
  100% {
    transform: scale(1.02);
    background-position: center top;
  }
}

.ppos-brand-cover-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(8, 22, 48, 0.15) 0%, rgba(13, 71, 161, 0.5) 50%, rgba(11, 31, 58, 0.98) 100%),
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(30, 136, 229, 0.22), transparent 60%);
  pointer-events: none;
}

.ppos-brand-cover-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  pointer-events: auto;
}

.ppos-brand-cover-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.ppos-brand-cover-dot.is-active {
  background: #ffeb3b;
  transform: scale(1.2);
}

.ppos-brand-cover-dot:focus-visible {
  outline: 2px solid #ffeb3b;
  outline-offset: 2px;
}

html.ppos-low-motion .ppos-login-pattern--rings,
html.ppos-low-motion .ppos-login-pattern--water {
  opacity: 0.12;
}

html.ppos-low-motion .ppos-brand-cover-slide {
  transform: none !important;
  animation: none !important;
  transition: opacity 0.2s ease;
}

html.ppos-low-motion .ppos-brand-cover-slide.is-active,
html.ppos-low-motion .ppos-brand-cover-slide--people.is-active,
html.ppos-low-motion .ppos-brand-cover-slide--cartoon.is-active {
  animation: none;
  opacity: 1;
}

html.ppos-low-motion .ppos-brand-cover-dot {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .ppos-brand-cover-slide {
    transform: none !important;
    animation: none !important;
    transition: opacity 0.45s ease;
  }

  .ppos-brand-cover-slide.is-active,
  .ppos-brand-cover-slide--people.is-active,
  .ppos-brand-cover-slide--cartoon.is-active {
    animation: none;
    opacity: 1;
  }
}

.ppos-login-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  height: var(--ppos-cover-h);
  min-height: 260px;
  max-height: 440px;
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: max(1rem, env(safe-area-inset-top)) 1.25rem 0.85rem;
  text-align: center;
  color: #fff;
  border-radius: 0 0 1.35rem 1.35rem;
}

.ppos-login-col--brand .ppos-login-hero {
  position: relative;
  z-index: 3;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 0;
  padding-bottom: 0.5rem;
}

.ppos-login-form-intro {
  margin-bottom: 1.35rem;
  text-align: center;
}

.ppos-login-eyebrow {
  display: none;
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ppos-saas-accent);
}

.ppos-login-welcome {
  display: none;
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ppos-saas-text);
  letter-spacing: -0.02em;
}

.ppos-login-welcome-sub {
  display: none;
  margin: 0.45rem 0 0;
  font-size: 0.9375rem;
  color: var(--ppos-saas-muted);
  line-height: 1.5;
}

.ppos-login-brand--desktop {
  display: none;
}

.ppos-login-brand--desktop .ppos-brand-logo-link {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 auto 0.5rem;
}

.ppos-brand-logo--form {
  width: 104px !important;
  height: 104px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  border: 3px solid var(--ppos-saas-border);
  box-shadow: var(--ppos-saas-shadow);
}

.ppos-brand-logo--form img.is-store-logo {
  object-fit: cover;
}

.footer-copyright--form {
  display: none;
}

.footer-copyright--brand {
  display: block;
  position: relative;
  z-index: 5;
  width: 100%;
  margin-top: auto;
  flex-shrink: 0;
  text-align: center;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  font-size: 13px;
  color: rgba(255, 255, 255, 0.92);
  background: linear-gradient(180deg, transparent, rgba(8, 22, 48, 0.78));
}

.ppos-login-toolbar {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top));
  right: clamp(0.85rem, 2vw, 1.5rem);
  left: auto;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

.ppos-login-lang-dd {
  position: relative;
  display: inline-block;
}

.ppos-login-lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.4rem 0.75rem 0.4rem 0.55rem;
  border: 1px solid var(--ppos-saas-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ppos-saas-text);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--ppos-saas-shadow);
  backdrop-filter: blur(8px);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ppos-login-lang-trigger:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.ppos-login-lang-trigger.is-open {
  border-color: var(--ppos-saas-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.ppos-login-lang-trigger.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

.ppos-login-lang-trigger__flag {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.ppos-login-lang-trigger__label {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppos-login-lang-trigger__chev {
  font-size: 1rem;
  color: var(--ppos-saas-muted);
  transition: transform 0.2s ease;
}

.ppos-login-lang-trigger.is-open .ppos-login-lang-trigger__chev {
  transform: rotate(180deg);
}

.ppos-login-lang-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 11.5rem;
  padding: 0.35rem;
  border: 1px solid var(--ppos-saas-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  z-index: 30;
}

.ppos-login-lang-menu:not([hidden]) {
  display: block;
}

.ppos-login-lang-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 40px;
  padding: 0.45rem 0.65rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ppos-saas-text);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.ppos-login-lang-option img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.ppos-login-lang-option span {
  flex: 1 1 auto;
}

.ppos-login-lang-option__check {
  font-size: 1.05rem;
  color: var(--ppos-saas-accent);
  opacity: 0;
}

.ppos-login-lang-option.is-active .ppos-login-lang-option__check,
.ppos-login-lang-option[aria-selected="true"] .ppos-login-lang-option__check {
  opacity: 1;
}

.ppos-login-lang-option:hover,
.ppos-login-lang-option:focus-visible {
  background: rgba(37, 99, 235, 0.08);
  color: var(--ppos-saas-accent);
  outline: none;
}

.ppos-login-lang-option.is-active {
  background: rgba(37, 99, 235, 0.1);
  color: var(--ppos-saas-accent);
  font-weight: 600;
}

.ppos-login-hero .ppos-brand-logo-wrap .logo,
.ppos-login-hero-inner .ppos-brand-logo-wrap .logo,
.ppos-login-hero .ppos-brand-logo,
.ppos-brand-logo {
  position: static;
  top: auto;
  left: auto;
  margin: 0;
  width: 128px;
  height: 128px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ppos-login-hero .logo img,
.ppos-login-hero-inner .logo img,
.ppos-brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
}

.ppos-brand-logo img.is-store-logo,
#logoIMGHero.is-store-logo,
#logoIMG.is-store-logo {
  object-fit: cover;
}

.ppos-login-hero .login-title-main {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}

.ppos-login-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
}

.ppos-brand-logo-link {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

.ppos-brand-logo-link:focus-visible {
  outline: 2px solid #ffeb3b;
  outline-offset: 4px;
  border-radius: 50%;
}

.ppos-brand-wordmark {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem;
  margin: 0 0 0.35rem;
  line-height: 1;
}

.ppos-brand-wordmark-en {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.95);
  text-transform: uppercase;
}

.ppos-brand-wordmark-pos {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffeb3b;
  letter-spacing: 0.06em;
}

.ppos-login-brand-tagline {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  text-align: center;
}

.ppos-login-shell {
  position: relative;
  z-index: 2;
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  min-height: 0;
  padding: max(3.25rem, calc(0.75rem + env(safe-area-inset-top))) 1rem 0.5rem;
  background: transparent;
  box-sizing: border-box;
}

.ppos-login-panel .card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 1.5rem 1.35rem 1.35rem;
}

.ppos-login-fields {
  width: 100%;
}

.ppos-login-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.ppos-login-panel {
  position: relative;
  border: 1px solid var(--ppos-saas-border);
  box-shadow: var(--ppos-saas-shadow);
  border-radius: var(--ppos-saas-radius);
  overflow: visible;
  background: var(--ppos-saas-surface);
  width: 100%;
}

.ppos-login-brand {
  text-align: center;
  margin-bottom: 0.5rem;
}

.ppos-login-heading {
  margin: 5rem 0 0.75rem;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
}

/* โลโก้ໃນຟອร์ມ — center + ຂະໜາດໃຫຍ່ */
.ppos-login-brand--desktop .logo {
  position: static;
  top: auto;
  left: auto;
  margin: 0 auto;
  width: 104px;
  height: 104px;
}

.login-title-main {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--ppos-saas-text);
}

.login-title-sub {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  margin-top: 4px;
}

.ppos-login-panel h1,
.ppos-login-panel h2 {
  margin: 0;
}

/* Material outlined fields */
.form-floating-wrapper {
  position: relative;
  width: 100%;
  --ppos-input-icon-left: 18px;
  --ppos-input-icon-size: 22px;
  --ppos-input-icon-gap: 18px;
  --ppos-input-text-left: calc(var(--ppos-input-icon-left) + var(--ppos-input-icon-size) + var(--ppos-input-icon-gap));
  --ppos-input-float-top: -8px;
  --ppos-input-float-icon-left: calc(var(--ppos-input-text-left) - 20px);
}

.form-floating-wrapper--plain {
  --ppos-input-text-left: 16px;
}

.input-icon {
  position: absolute;
  left: var(--ppos-input-icon-left);
  top: 50%;
  transform: translateY(-50%);
  color: rgba(0, 0, 0, 0.54);
  z-index: 2;
  pointer-events: none;
  width: 22px;
  height: 22px;
  transform-origin: left center;
  transition: top 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    left 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-icon ion-icon {
  width: 22px;
  height: 22px;
  color: currentColor;
}

.form-floating-wrapper.has-value .input-icon {
  top: var(--ppos-input-float-top);
  left: var(--ppos-input-float-icon-left);
  transform: scale(0.75);
  color: rgba(0, 0, 0, 0.6);
}

.form-floating-wrapper:focus-within .input-icon {
  top: var(--ppos-input-float-top);
  left: var(--ppos-input-float-icon-left);
  transform: scale(0.75);
  color: var(--ppos-saas-accent);
}

.floating-input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 1.45rem 16px 0.45rem var(--ppos-input-text-left);
  margin: 0;
  border: 1.5px solid var(--ppos-saas-border);
  border-radius: var(--ppos-saas-radius);
  background-color: #fff;
  color: var(--ppos-saas-text);
  font-size: 16px;
  line-height: 1.35;
  caret-color: var(--ppos-saas-accent);
  transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-input:hover {
  border-color: #cbd5e1;
  background-color: #fff;
}

.floating-input:focus {
  outline: none;
  border-color: var(--ppos-saas-accent);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.floating-input::placeholder {
  color: transparent;
}

.floating-label {
  position: absolute;
  top: 50%;
  left: var(--ppos-input-text-left);
  max-width: calc(100% - var(--ppos-input-text-left) - 16px);
  padding: 0 0.35rem 0 0.25rem;
  pointer-events: none;
  transform-origin: 0 0;
  transform: translateY(-50%);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    top 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: rgba(0, 0, 0, 0.6);
  font-size: 16px;
  line-height: 1.2;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(180deg, transparent 35%, rgba(255, 255, 255, 0.96) 35%);
}

.floating-input:focus ~ .floating-label,
.floating-input:not(:placeholder-shown) ~ .floating-label,
.floating-input:-webkit-autofill ~ .floating-label,
.floating-input:autofill ~ .floating-label,
.floating-input.has-value ~ .floating-label {
  top: var(--ppos-input-float-top);
  transform: scale(0.75) translateX(-2px);
  left: var(--ppos-input-text-left);
  font-weight: 500;
}

.floating-input:focus ~ .floating-label {
  color: var(--ppos-saas-accent);
}

.floating-input:not(:focus):not(:placeholder-shown) ~ .floating-label,
.floating-input:not(:focus).has-value ~ .floating-label {
  color: rgba(0, 0, 0, 0.6);
}

.form-floating-wrapper--password .floating-input {
  padding-right: 56px;
}

.form-floating-wrapper--password .floating-label {
  max-width: calc(100% - var(--ppos-input-text-left) - 56px);
}

.floating-input.form-control {
  border-radius: var(--ppos-saas-radius) !important;
  box-shadow: none !important;
}

.password-toggle-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(0, 0, 0, 0.54);
  cursor: pointer;
}

.password-toggle-btn:hover {
  color: var(--ppos-saas-accent);
  background: rgba(37, 99, 235, 0.08);
}

.password-toggle-btn ion-icon {
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.btn-submit,
.btn-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 12px 24px;
  border: none !important;
  border-radius: var(--ppos-saas-radius) !important;
  font-weight: 600;
  font-size: 15px;
  color: #fff !important;
  background: linear-gradient(135deg, #3b82f6 0%, var(--ppos-saas-accent) 55%, #1e40af 100%) !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
  cursor: pointer;
  gap: 0.4rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-submit:hover,
.btn-next:hover {
  background: linear-gradient(135deg, #2563eb 0%, var(--ppos-saas-accent-hover) 55%, #1e3a8a 100%) !important;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.34);
  transform: translateY(-1px);
}

.btn-submit:disabled:not(.is-loading),
.btn-next:disabled:not(.is-loading) {
  background: rgba(0, 0, 0, 0.12) !important;
  color: rgba(255, 255, 255, 0.38) !important;
  box-shadow: none;
}

.btn-submit.is-loading,
.btn-next.is-loading {
  pointer-events: none;
  position: relative;
  opacity: 0.95;
}

.btn-submit.is-loading .btn-text,
.btn-next.is-loading .btn-text {
  visibility: hidden;
}

.btn-submit.is-loading::after,
.btn-next.is-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.25rem;
  height: 1.25rem;
  margin: -0.625rem 0 0 -0.625rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pposLoginBtnSpin 0.65s linear infinite;
}

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

.btn-next .btn-text ion-icon,
.btn-submit .btn-text ion-icon {
  width: 20px;
  height: 20px;
}

.login-back-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  color: var(--ppos-saas-accent);
  cursor: pointer;
  font-weight: 500;
}

.login-step-2 {
  display: none;
}

.login-step-2.is-active {
  display: block;
}

.login-step-1.is-hidden {
  display: none !important;
}

.ppos-login-page .footer-copyright {
  position: relative;
  flex-shrink: 0;
  margin-top: auto;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  font-size: 13px;
  z-index: 10;
  background: linear-gradient(180deg, transparent, rgba(13, 71, 161, 0.45));
}

.ppos-login-page .footer-copyright a {
  color: #fff;
  text-decoration: underline;
}

.ppos-login-col--form .footer-copyright--form {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: 100%;
  max-width: 420px;
  margin: 0.75rem auto 0;
  text-align: center;
  color: var(--ppos-saas-muted);
  background: transparent;
  padding: 0 1rem max(0.75rem, env(safe-area-inset-bottom));
}

.ppos-login-col--form .footer-copyright--form a {
  color: var(--ppos-saas-accent);
  text-decoration: none;
}

.ppos-login-col--form .footer-copyright--form a:hover {
  text-decoration: underline;
}

.md-toast-container,
#mdToastContainer {
  position: fixed;
  left: 0;
  width: 100%;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  bottom: 0;
}

.md-toast {
  color: #fff;
  padding: 16px 24px;
  width: 100%;
  font-size: 16px;
  animation: mdSlideUpFull 0.4s cubic-bezier(0, 0, 0.2, 1);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #322f35;
}

.md-toast.danger { background-color: #b3261e !important; }
.md-toast.success { background-color: #2e7d32 !important; }
.md-toast.warning { background-color: #ed6c02 !important; }

@keyframes mdSlideUpFull {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* —— Mobile: brand top, flat form —— */
@media (max-width: 991.98px) {
  .ppos-login-page {
    min-height: 100dvh;
    background-color: #0b1f3a;
  }

  .ppos-login-col--form {
    background: transparent;
    justify-content: center;
  }

  .ppos-login-toolbar {
    right: 0.85rem;
  }

  .ppos-login-col--brand {
    min-height: var(--ppos-cover-h);
  }

  .ppos-login-col--brand .ppos-login-hero {
    height: auto;
    min-height: 0;
    max-height: none;
    flex: 1 1 auto;
    justify-content: flex-end;
    padding: max(1rem, env(safe-area-inset-top)) 1.25rem 0.5rem;
  }

  .footer-copyright--brand {
    margin-top: auto;
    font-size: 12px;
    padding: 10px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, transparent, rgba(13, 71, 161, 0.72));
  }

  .ppos-login-patterns {
    display: block;
  }

  .ppos-brand-wordmark {
    margin-bottom: 0.5rem;
  }

  .ppos-login-shell {
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
    max-width: 100%;
    padding: max(3rem, calc(0.5rem + env(safe-area-inset-top))) 1rem 0.5rem;
  }

  .ppos-login-container {
    max-width: 100%;
    padding: 0;
  }

  .ppos-login-panel {
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
  }

  .ppos-login-panel .card-body {
    padding: 0.5rem 0 0;
  }

  .ppos-login-heading {
    margin: 0;
  }

  .login-title-main {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    line-height: 1.35;
  }

  .login-title-sub {
    font-size: 0.8125rem;
    opacity: 0.9;
  }

  .ppos-login-fields .floating-input {
    background: #fff;
    border-color: #dee2e6;
    border-radius: 12px;
    min-height: 54px;
  }

  .btn-submit,
  .btn-next {
    min-height: 52px;
    border-radius: 12px !important;
    font-size: 16px;
  }

  .login-back-link {
    color: #90caf9;
  }

  .login-back-link:hover {
    color: #bbdefb;
  }
}

/* —— Desktop split: brand left · login right —— */
@media (min-width: 992px) {
  .ppos-login-page {
    overflow: hidden;
    background-color: var(--ppos-saas-bg);
  }

  .ppos-login-patterns {
    display: none;
  }

  .ppos-login-split {
    display: grid;
    grid-template-columns: minmax(480px, 1.05fr) minmax(420px, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
  }

  .ppos-login-col--form {
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 3vw, 3rem);
    border-right: none;
    border-left: 1px solid var(--ppos-saas-border);
  }

  .ppos-login-col--form::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.18) 1px, transparent 0);
    background-size: 28px 28px;
    opacity: 0.55;
  }

  .ppos-login-col--brand {
    order: 1;
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
  }

  .ppos-login-col--brand .ppos-brand-cover-dots {
    bottom: calc(3.75rem + env(safe-area-inset-bottom, 0px));
  }

  .ppos-login-col--brand .ppos-brand-cover,
  .ppos-login-col--brand .ppos-login-hero {
    border-radius: 0;
  }

  .ppos-login-col--brand .ppos-brand-cover {
    inset: 0;
  }

  .ppos-login-col--brand .ppos-login-hero {
    position: relative;
    inset: auto;
    height: auto;
    min-height: 0;
    max-height: none;
    flex: 1 1 auto;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2.5rem 2.5rem 1rem;
  }

  .ppos-login-col--brand .ppos-login-hero-inner {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
  }

  .ppos-login-col--brand .ppos-brand-logo,
  .ppos-login-col--brand .logo {
    width: 148px;
    height: 148px;
  }

  .ppos-login-col--brand .login-title-main {
    font-size: 2rem;
    color: #fff;
  }

  .ppos-login-col--brand .login-title-sub {
    font-size: 1rem;
    max-width: 36ch;
    margin-left: auto;
    margin-right: auto;
  }

  .footer-copyright--brand {
    margin-top: auto;
    z-index: 5;
    background: linear-gradient(180deg, transparent, rgba(8, 22, 48, 0.85));
  }

  .footer-copyright--form {
    display: block;
    margin-top: 0.75rem;
    padding: 0 0 max(0.5rem, env(safe-area-inset-bottom));
    text-align: center;
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  .ppos-login-shell {
    align-items: center;
    justify-content: center;
    padding: max(3.25rem, calc(0.75rem + env(safe-area-inset-top))) 0 0;
    flex: 0 1 auto;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }

  .ppos-login-container {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
  }

  .ppos-login-panel {
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .ppos-login-panel .card-body {
    padding: 0;
  }

  .ppos-login-form-intro {
    margin-bottom: 1.75rem;
    text-align: center;
  }

  .ppos-login-eyebrow,
  .ppos-login-welcome,
  .ppos-login-welcome-sub {
    display: block;
    text-align: center;
  }

  .ppos-login-brand--desktop {
    display: block;
    text-align: center;
    margin-bottom: 1.25rem;
  }

  .ppos-login-brand--desktop .ppos-brand-logo-link {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 auto 0.65rem;
  }

  .ppos-login-brand--desktop .logo,
  .ppos-brand-logo--form {
    width: 136px !important;
    height: 136px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    border-width: 3px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  }

  .ppos-login-brand--desktop .ppos-login-heading {
    margin: 0.75rem 0 0.25rem;
    text-align: center;
  }

  .ppos-login-brand--desktop .login-title-main {
    font-size: 1.25rem;
    color: var(--ppos-saas-text);
    text-shadow: none;
  }

  .ppos-login-brand--desktop .ppos-login-brand-tagline {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--ppos-saas-muted);
  }

  .ppos-login-fields .floating-input {
    min-height: 54px;
  }

  .login-back-link {
    color: var(--ppos-saas-accent);
  }

  .login-back-link:hover {
    color: var(--ppos-saas-accent-hover);
  }
}
