/* ============================================================================
   YangonPOS — Auth surface
   Login, signup, password reset and two-factor screens.

   Built on the YangonPOS Design System 2.0 tokens (yp-tokens.css). The accent
   follows --clr-primary so reseller branding keeps working. Every value has a
   fallback so the addon views that still use the legacy markup keep rendering
   correctly.
   ========================================================================== */

/* --- Self-hosted type ------------------------------------------------------ */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/web/inter-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/web/inter-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/web/inter-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/web/inter-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/web/inter-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/web/inter-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/web/inter-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/web/inter-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/web/manrope-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/web/manrope-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/web/manrope-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/web/manrope-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/web/manrope-800-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/web/manrope-800-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Sans Myanmar";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/web/noto-sans-myanmar-400-myanmar.woff2") format("woff2");
  unicode-range: U+1000-109F, U+A9E0-A9FF, U+AA60-AA7F;
}
@font-face {
  font-family: "Noto Sans Myanmar";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/web/noto-sans-myanmar-600-myanmar.woff2") format("woff2");
  unicode-range: U+1000-109F, U+A9E0-A9FF, U+AA60-AA7F;
}
@font-face {
  font-family: "Noto Sans Myanmar";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/web/noto-sans-myanmar-700-myanmar.woff2") format("woff2");
  unicode-range: U+1000-109F, U+A9E0-A9FF, U+AA60-AA7F;
}

/* --- Design variables ------------------------------------------------------ */
:root {
  --auth-accent: var(--clr-primary, #c52127);
  --auth-accent-deep: color-mix(in srgb, var(--auth-accent) 74%, #2a0507);
  --auth-accent-ink: color-mix(in srgb, var(--auth-accent) 78%, #1c0b0b);
  --auth-accent-soft: color-mix(in srgb, var(--auth-accent) 7%, #ffffff);
  --auth-accent-line: color-mix(in srgb, var(--auth-accent) 20%, #ffffff);
  --auth-ring: color-mix(in srgb, var(--auth-accent) 18%, transparent);

  --auth-ink: #171313;
  --auth-ink-2: #5b5353;
  --auth-ink-3: #7a7272;
  --auth-line: #ebe5e4;
  --auth-line-strong: #d9d1d0;
  --auth-canvas: #faf7f6;
  --auth-surface: #ffffff;

  --auth-control-h: 46px;
  --auth-radius: 12px;
  --auth-radius-card: 20px;

  --auth-shadow-card: 0 1px 2px rgba(24, 16, 16, 0.04),
    0 32px 64px -36px rgba(24, 16, 16, 0.28);
  --auth-shadow-btn: 0 14px 26px -16px
    color-mix(in srgb, var(--auth-accent) 78%, transparent);

  --auth-font: var(--yp-font-sans, "Inter", system-ui, -apple-system, "Segoe UI", sans-serif);
  --auth-font-display: var(--yp-font-display, "Manrope", "Inter", system-ui, sans-serif);
  --auth-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- Base ------------------------------------------------------------------ */
.yp-auth,
.yp-auth body {
  color-scheme: light;
}

body.yp-auth {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--auth-canvas);
  color: var(--auth-ink);
  font-family: var(--auth-font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.yp-auth img {
  max-width: 100%;
  height: auto;
}

body.yp-auth :focus-visible {
  outline: 3px solid color-mix(in srgb, var(--auth-accent) 45%, transparent);
  outline-offset: 2px;
}

/* --- Shell ----------------------------------------------------------------- */
.auth-skip {
  position: absolute;
  top: -64px;
  left: 16px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--auth-ink);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.18s var(--auth-ease);
}

.auth-skip:focus {
  top: 16px;
  color: #fff;
  text-decoration: none;
}

.auth-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

/* --- Brand panel ----------------------------------------------------------- */
.auth-brand {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.4vh, 28px);
  padding: clamp(24px, 3vw, 44px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(
      110% 80% at 0% 0%,
      color-mix(in srgb, var(--auth-accent) 82%, #ff8b8b) 0%,
      transparent 58%
    ),
    radial-gradient(
      90% 70% at 100% 100%,
      color-mix(in srgb, var(--auth-accent) 46%, #1a0304) 0%,
      transparent 62%
    ),
    linear-gradient(158deg, var(--auth-accent) 0%, var(--auth-accent-deep) 100%);
}

/* receipt-grid texture */
.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(120% 100% at 15% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 100% at 15% 0%, #000 20%, transparent 78%);
}

/* soft light bloom */
.auth-brand::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 520px;
  height: 520px;
  right: -220px;
  top: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 62%);
  pointer-events: none;
}

.auth-brand-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 40px;
}

.auth-brand-logo {
  display: block;
  width: auto;
  height: 38px;
  max-width: 210px;
}

.auth-brand-name {
  font-family: var(--auth-font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

/* legacy markup wrapper (addon views) */
.auth-brand-content {
  position: relative;
  z-index: 1;
  margin: auto 0;
  max-width: 440px;
}

.auth-brand-content p {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

.auth-brand-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 440px;
  margin: auto 0;
}

.auth-brand-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}

.auth-brand-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}

.auth-brand-headline {
  margin: 0;
  font-family: var(--auth-font-display);
  font-size: clamp(1.6rem, 2vw, 2.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: #fff;
  text-wrap: balance;
}

.auth-brand-sub {
  margin: 0;
  max-width: 40ch;
  font-size: 0.95rem;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.9);
}

.auth-brand-points {
  display: grid;
  gap: 11px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.auth-brand-point {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.auth-brand-point-icon {
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.auth-brand-point-icon svg {
  width: 17px;
  height: 17px;
}

.auth-brand-point strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
}

.auth-brand-point span {
  display: block;
  margin-top: 2px;
  font-size: 0.78125rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

/* decorative dashboard preview */
.auth-brand-preview {
  position: relative;
  z-index: 1;
  max-width: 100%;
  padding: 14px 16px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.auth-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
}

.auth-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.auth-preview-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7ef0b6;
  box-shadow: 0 0 8px rgba(126, 240, 182, 0.9);
}

.auth-preview-chart {
  display: block;
  width: 100%;
  height: 62px;
  margin: 10px 0 8px;
  overflow: visible;
}

.auth-preview-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.82);
}

.auth-preview-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-preview-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
}

.auth-preview-legend i.dot-b {
  background: rgba(255, 255, 255, 0.55);
}

.auth-preview-legend i.dot-c {
  background: rgba(255, 255, 255, 0.32);
}

.auth-brand-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
}

.auth-brand-foot svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

/* legacy illustration hook */
.auth-brand-illustration {
  display: none;
}

/* --- Form panel ------------------------------------------------------------ */
.auth-form {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(18px, 3vw, 40px) clamp(18px, 3vw, 48px);
  overflow-y: auto;
  background:
    radial-gradient(
      900px 460px at 100% 0%,
      color-mix(in srgb, var(--auth-accent) 6%, transparent) 0%,
      transparent 62%
    ),
    var(--auth-canvas);
}

.auth-form::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(28, 25, 25, 0.055) 1px, transparent 0);
  background-size: 22px 22px;
  mask-image: radial-gradient(80% 60% at 0% 100%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(80% 60% at 0% 100%, #000 0%, transparent 70%);
  pointer-events: none;
}

.auth-form-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin: auto 0;
  animation: auth-rise 0.55s var(--auth-ease) both;
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.auth-mobile-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 8px 18px -10px rgba(197, 33, 39, 0.6);
}

.auth-mobile-name {
  font-family: var(--auth-font-display);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--auth-ink);
}

/* --- Card ------------------------------------------------------------------ */
.auth-form-card {
  padding: clamp(22px, 2.4vw, 34px);
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius-card);
  background: var(--auth-surface);
  box-shadow: var(--auth-shadow-card);
}

.auth-card-head {
  margin-bottom: 20px;
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  padding: 4px 9px 4px 8px;
  border: 1px solid var(--auth-accent-line);
  border-radius: 999px;
  background: var(--auth-accent-soft);
  color: var(--auth-accent-ink);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.auth-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--auth-accent);
}

.auth-form-card h1,
.auth-form-card h2 {
  margin: 0;
  font-family: var(--auth-font-display);
  font-size: clamp(1.375rem, 1.8vw, 1.625rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.028em;
  color: var(--auth-ink);
  text-wrap: balance;
}

.auth-form-card .auth-sub,
.auth-form-card > p {
  margin: 6px 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--auth-ink-2);
}

.auth-card-head .auth-sub {
  margin-bottom: 0;
}

.auth-form-card > p {
  margin-bottom: 18px;
}

/* --- Fields ---------------------------------------------------------------- */
.auth-form-body {
  margin-top: 0;
}

.auth-field {
  margin-bottom: 13px;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.auth-label,
.auth-form-card .form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78125rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--auth-ink);
}

.auth-label-row .auth-label {
  margin-bottom: 0;
}

.auth-label-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--auth-accent);
  text-decoration: none;
}

.auth-label-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-req {
  margin-left: 2px;
  color: var(--auth-accent);
}

.input-group {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.auth-form-card .form-control,
.auth-form-card .input-group .form-control {
  display: block;
  width: 100%;
  height: var(--auth-control-h);
  padding: 0 14px 0 46px;
  border: 1px solid var(--auth-line-strong);
  border-radius: var(--auth-radius);
  background: #fff;
  color: var(--auth-ink);
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(24, 16, 16, 0.02);
  transition: border-color 0.16s var(--auth-ease), box-shadow 0.16s var(--auth-ease),
    background 0.16s var(--auth-ease);
}

.auth-form-card .form-control::placeholder {
  color: #8f8584;
  opacity: 1;
}

.auth-form-card .form-control:hover {
  border-color: color-mix(in srgb, var(--auth-line-strong) 70%, var(--auth-accent));
}

.auth-form-card .form-control:focus {
  border-color: var(--auth-accent);
  outline: none;
  box-shadow: 0 0 0 4px var(--auth-ring);
}

.auth-form-card .form-control.is-invalid,
.auth-form-card .form-control.error {
  border-color: var(--yp-danger, #a3151a);
  background: color-mix(in srgb, var(--yp-danger, #a3151a) 3%, #fff);
}

.auth-form-card .form-control:disabled,
.auth-form-card .form-control[readonly] {
  background: var(--yp-surface-3, #f2eeed);
  color: var(--auth-ink-2);
  cursor: not-allowed;
}

.input-group-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: var(--auth-ink-3);
  pointer-events: none;
  transition: color 0.16s var(--auth-ease);
}

.input-group-icon svg {
  width: 18px;
  height: 18px;
}

.input-group-icon img {
  width: 16px;
  height: 16px;
  opacity: 0.55;
}

.input-group:focus-within .input-group-icon {
  color: var(--auth-accent);
}

.input-group:has(.password-toggle) .form-control {
  padding-right: 50px;
}

.password-toggle {
  position: absolute;
  right: 7px;
  top: 50%;
  /* Bootstrap raises `.input-group .form-control:focus` to z-index 3, which
     would otherwise sit on top of the reveal button while typing. */
  z-index: 6;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--auth-ink-3);
  cursor: pointer;
  transition: background 0.16s var(--auth-ease), color 0.16s var(--auth-ease);
}

.password-toggle:hover {
  background: var(--auth-accent-soft);
  color: var(--auth-accent);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.password-toggle img {
  width: 18px;
  height: 18px;
  opacity: 0.55;
}

/* select fields */
.auth-select-wrap {
  position: relative;
}

.auth-select-wrap::after {
  content: "";
  position: absolute;
  right: 17px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--auth-ink-3);
  border-bottom: 2px solid var(--auth-ink-3);
  transform: translateY(-72%) rotate(45deg);
  pointer-events: none;
}

.auth-form-card select.form-control,
.auth-form-card .auth-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  padding-left: 14px;
  cursor: pointer;
}

.auth-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 5px 0 0;
  font-size: 0.6875rem;
  line-height: 1.45;
  color: var(--auth-ink-3);
}

.auth-hint svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin-top: 1px;
}

.auth-error,
.auth-form-card label.error {
  display: block;
  margin: 7px 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--yp-danger, #a3151a);
}

/* form.js injects `<label class="error">` right after the field. Inside the
   flex `.input-group` it must take a full row instead of squeezing the input. */
.input-group > label.error {
  flex: 0 0 100%;
  width: 100%;
  order: 10;
}

/* --- Alerts ---------------------------------------------------------------- */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--yp-danger, #a3151a) 20%, #fff);
  border-radius: 12px;
  background: var(--yp-danger-soft, #fdecec);
  color: color-mix(in srgb, var(--yp-danger, #a3151a) 88%, #000);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.auth-alert > svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.auth-alert strong {
  display: block;
  font-weight: 700;
}

.auth-alert ul {
  margin: 4px 0 0;
  padding-left: 16px;
}

.auth-alert a {
  color: inherit;
  font-weight: 600;
}

.auth-alert--info {
  border-color: var(--auth-accent-line);
  background: var(--auth-accent-soft);
  color: var(--auth-accent-ink);
}

/* --- Remember / links ------------------------------------------------------ */
.auth-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 2px 0 14px;
}

.auth-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--auth-ink-2);
  cursor: pointer;
  user-select: none;
}

.auth-checkbox input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  border-radius: 5px;
  accent-color: var(--auth-accent);
  cursor: pointer;
}

.auth-links a {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--auth-accent);
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Primary button -------------------------------------------------------- */
.auth-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: var(--auth-control-h);
  padding: 0 20px;
  border: 0;
  border-radius: var(--auth-radius);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--auth-accent) 88%, #fff) 0%,
      var(--auth-accent) 52%,
      var(--auth-accent-deep) 100%
    );
  color: #fff;
  font-family: inherit;
  font-size: 0.90625rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    var(--auth-shadow-btn);
  transition: transform 0.16s var(--auth-ease), box-shadow 0.16s var(--auth-ease),
    filter 0.16s var(--auth-ease);
}

.auth-btn:hover {
  color: #fff;
  text-decoration: none;
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 20px 34px -16px color-mix(in srgb, var(--auth-accent) 82%, transparent);
}

.auth-btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.auth-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--auth-accent) 40%, transparent);
  outline-offset: 2px;
}

.auth-btn:disabled,
.auth-btn.disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.auth-btn .auth-btn-arrow {
  width: 17px;
  height: 17px;
  transition: transform 0.18s var(--auth-ease);
}

.auth-btn:hover .auth-btn-arrow {
  transform: translateX(3px);
}

.auth-btn + .auth-btn,
.auth-btn + .auth-divider {
  margin-top: 12px;
}

.auth-btn--ghost {
  border: 1px solid var(--auth-line-strong);
  background: #fff;
  color: var(--auth-ink);
  box-shadow: none;
}

.auth-btn--ghost:hover {
  border-color: var(--auth-accent-line);
  background: var(--auth-accent-soft);
  color: var(--auth-accent-ink);
  box-shadow: none;
  filter: none;
}

/* --- Divider + social ------------------------------------------------------ */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-line);
}

.auth-divider span {
  flex: 0 0 auto;
  font-size: 0.6563rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--auth-ink-3);
  white-space: nowrap;
}

.auth-social {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.auth-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--auth-line-strong);
  border-radius: var(--auth-radius);
  background: #fff;
  color: var(--auth-ink);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.16s var(--auth-ease), background 0.16s var(--auth-ease),
    box-shadow 0.16s var(--auth-ease), transform 0.16s var(--auth-ease);
}

.auth-social a:hover {
  border-color: var(--auth-accent-line);
  background: var(--auth-accent-soft);
  color: var(--auth-accent-ink);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -18px rgba(24, 16, 16, 0.5);
}

.auth-social a img,
.auth-social a svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

/* --- Footer ---------------------------------------------------------------- */
.auth-footer {
  margin-top: 18px;
  font-size: 0.78125rem;
  line-height: 1.5;
  color: var(--auth-ink-2);
  text-align: center;
}

.auth-footer a {
  margin-left: 2px;
  color: var(--auth-accent);
  font-weight: 700;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-legal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  font-size: 0.6875rem;
  line-height: 1.5;
  color: var(--auth-ink-3);
  text-align: center;
}

.auth-legal svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--auth-ink-2);
  text-decoration: none;
  transition: color 0.16s var(--auth-ease);
}

.back-link:hover {
  color: var(--auth-accent);
  text-decoration: none;
}

.back-link i,
.back-link svg {
  font-size: 0.75rem;
  width: 14px;
  height: 14px;
}

/* --- Code input (2FA / OTP) ------------------------------------------------ */
.auth-code-input {
  height: 58px;
  padding: 0 18px !important;
  font-family: var(--auth-font-display);
  font-size: 1.5rem !important;
  font-weight: 700;
  letter-spacing: 0.5em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.auth-code-input::placeholder {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

/* --- OTP modals (SMS addon) ------------------------------------------------ */
.yp-auth .modal-content {
  border: 0;
  border-radius: 20px;
  box-shadow: var(--yp-shadow-xl, 0 32px 64px -24px rgba(28, 25, 25, 0.24));
}

.yp-auth .modal-header {
  border-bottom: 0;
}

.yp-auth .modal-body {
  padding: 0 24px 24px;
}

/* Reset/OTP modals live outside .auth-form-card, so give their fields the
   same control styling as the card. */
.yp-auth .modal .form-control {
  height: var(--auth-control-h);
  padding: 0 14px 0 46px;
  border: 1px solid var(--auth-line-strong);
  border-radius: var(--auth-radius);
  background: #fff;
  color: var(--auth-ink);
  font-family: inherit;
  font-size: 0.9375rem;
}

.yp-auth .modal .form-control:focus {
  border-color: var(--auth-accent);
  outline: none;
  box-shadow: 0 0 0 4px var(--auth-ring);
}

.pin-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.pin-input {
  width: 44px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--auth-line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--auth-ink);
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  text-align: center;
  transition: border-color 0.16s var(--auth-ease), box-shadow 0.16s var(--auth-ease);
}

.pin-input:focus {
  border-color: var(--auth-accent);
  outline: none;
  box-shadow: 0 0 0 4px var(--auth-ring);
}

/* --- Utility --------------------------------------------------------------- */
.auth-spacer {
  height: 4px;
}

.auth-form-card .text-muted {
  color: var(--auth-ink-3) !important;
}

.auth-form-card small {
  font-size: 0.75rem;
}

/* --- Motion ---------------------------------------------------------------- */
@keyframes auth-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-form-inner {
    animation: none;
  }

  .auth-btn,
  .auth-btn .auth-btn-arrow,
  .auth-social a,
  .password-toggle,
  .auth-form-card .form-control {
    transition: none;
  }

  .auth-btn:hover,
  .auth-social a:hover {
    transform: none;
  }
}

/* --- Autofill -------------------------------------------------------------- */
.auth-form-card input:-webkit-autofill,
.auth-form-card input:-webkit-autofill:hover,
.auth-form-card input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--auth-ink);
  caret-color: var(--auth-ink);
  box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 9999s ease-out 0s;
}

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 1199.98px) {
  .auth-brand {
    padding: 36px 32px;
  }

  .auth-brand-headline {
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  }

  .auth-brand-preview {
    max-width: 100%;
  }
}

@media (max-height: 700px) and (min-width: 992px) {
  .auth-brand-preview {
    display: none;
  }

  .auth-brand {
    gap: 18px;
  }
}

@media (max-width: 991.98px) {
  :root {
    /* Touch-friendly controls once the split panel is gone. */
    --auth-control-h: 48px;
  }

  .auth-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-brand {
    display: none;
  }

  .auth-form {
    justify-content: flex-start;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 22px 18px 32px;
    background:
      radial-gradient(
        700px 380px at 50% -10%,
        color-mix(in srgb, var(--auth-accent) 7%, transparent) 0%,
        transparent 65%
      ),
      var(--auth-canvas);
  }

  .auth-form-inner {
    max-width: 460px;
  }

  .auth-mobile-brand {
    display: flex;
  }

  .auth-form-card {
    border-radius: 20px;
    padding: 24px;
  }
}

@media (max-width: 575.98px) {
  .auth-form {
    padding: 20px 16px 32px;
    background: var(--auth-canvas);
  }

  .auth-form::before {
    display: none;
  }

  .auth-mobile-brand {
    margin-bottom: 16px;
  }

  .auth-form-card {
    padding: 4px 2px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .auth-form-card h1,
  .auth-form-card h2 {
    font-size: 1.5rem;
  }

  .auth-eyebrow {
    margin-bottom: 12px;
  }

  .auth-card-head {
    margin-bottom: 22px;
  }

  .auth-social {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-links {
    margin-bottom: 18px;
  }

  .auth-btn {
    min-height: 50px;
  }

  .auth-code-input {
    height: 54px;
    letter-spacing: 0.35em;
  }
}

@media (max-width: 359.98px) {
  .auth-form {
    padding-left: 12px;
    padding-right: 12px;
  }

  .auth-form-card h1,
  .auth-form-card h2 {
    font-size: 1.375rem;
  }

  .auth-label {
    font-size: 0.7813rem;
  }
}

/* --- Laptop heights ---------------------------------------------------------
   Most laptops are 1366×768 or 1440×900. Tighten the rhythm so the whole card
   — including social sign-in and footer — stays above the fold. */
@media (min-width: 992px) and (max-height: 900px) {
  :root {
    --auth-control-h: 44px;
  }

  .auth-form {
    padding: 18px 32px;
  }

  .auth-form-card {
    padding: 24px 28px;
    border-radius: 18px;
  }

  .auth-card-head {
    margin-bottom: 16px;
  }

  .auth-eyebrow {
    margin-bottom: 8px;
  }

  .auth-form-card h1,
  .auth-form-card h2 {
    font-size: 1.5rem;
  }

  .auth-form-card .auth-sub,
  .auth-form-card > p {
    font-size: 0.84375rem;
  }

  .auth-field {
    margin-bottom: 11px;
  }

  .auth-hint {
    margin-top: 4px;
  }

  .auth-links {
    margin-bottom: 12px;
  }

  .auth-btn {
    min-height: 44px;
  }

  .auth-divider {
    margin: 14px 0;
  }

  .auth-social a {
    min-height: 42px;
  }

  .auth-footer {
    margin-top: 16px;
  }

  .auth-legal {
    margin-top: 10px;
  }

  .auth-brand {
    padding: 28px 34px;
    gap: 16px;
  }

  .auth-brand-headline {
    font-size: clamp(1.45rem, 1.9vw, 1.85rem);
  }

  .auth-brand-sub {
    font-size: 0.875rem;
  }

  .auth-brand-points {
    gap: 9px;
  }

  .auth-brand-point-icon {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
  }

  .auth-brand-point strong {
    font-size: 0.84375rem;
  }

  .auth-brand-point span {
    font-size: 0.75rem;
  }

  .auth-brand-preview {
    padding: 12px 14px 10px;
  }

  .auth-preview-chart {
    height: 48px;
    margin: 8px 0 6px;
  }
}

@media (min-width: 992px) and (max-height: 780px) {
  :root {
    --auth-control-h: 42px;
  }

  .auth-form {
    padding: 14px 28px;
  }

  .auth-form-card {
    padding: 20px 24px;
  }

  .auth-eyebrow {
    display: none;
  }

  .auth-card-head {
    margin-bottom: 12px;
  }

  .auth-form-card h1,
  .auth-form-card h2 {
    font-size: 1.375rem;
  }

  .auth-form-card .auth-sub,
  .auth-form-card > p {
    margin-top: 4px;
    font-size: 0.8125rem;
    line-height: 1.45;
  }

  .auth-field {
    margin-bottom: 9px;
  }

  .auth-hint {
    display: none;
  }

  .auth-hint--keep {
    display: flex;
  }

  .auth-label,
  .auth-label-row {
    margin-bottom: 4px;
  }

  .auth-links {
    margin-bottom: 10px;
  }

  .auth-btn {
    min-height: 42px;
    font-size: 0.875rem;
  }

  .auth-divider {
    margin: 12px 0;
  }

  .auth-social a {
    min-height: 40px;
  }

  .auth-footer {
    margin-top: 12px;
  }

  .auth-legal {
    display: none;
  }

  .auth-brand {
    padding: 22px 28px;
    gap: 12px;
  }

  .auth-brand-headline {
    font-size: 1.4rem;
  }

  .auth-brand-sub {
    font-size: 0.8125rem;
  }

  .auth-brand-points {
    gap: 7px;
  }

  .auth-brand-point > span:last-child > span {
    display: none;
  }

  .auth-brand-point-icon {
    flex-basis: 26px;
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }

  .auth-brand-point-icon svg {
    width: 14px;
    height: 14px;
  }

  .auth-brand-foot {
    font-size: 0.6875rem;
  }
}
