/* ==========================================================================
   auth.css -- the sign-in pages of Dashboard Navigator (login, register, forgot
   username / password, reset password, complete profile).

   Premium dark-navy "glass" look. Everything is sized in rem and the root font size follows the
   viewport (1rem = 16px on the 1672x941 reference design), so the composition of the design
   scales with the window instead of being re-laid-out at every width. Below 1100px the root
   stays at 16px and the layout becomes one column.

   No framework, no CDN: colours / radii / shadows are the tokens below.
   ========================================================================== */

:root {
  /* palette */
  --bg-0: #020B24;          /* deep navy background */
  --bg-1: #061A42;          /* corporate navy */
  --glass: #082451;         /* glass surface */
  --blue: #1678FF;          /* electric blue */
  --blue-deep: #0B52E0;
  --cyan: #00D4FF;          /* cyan accent */
  --accent: #258EFF;        /* border accent */
  --text: #FFFFFF;
  --text-2: #B6C9EA;        /* secondary text */
  --muted: #91A8CC;         /* muted text */
  --danger: #FF647C;
  --danger-text: #FFB3C0;
  --success: #16C784;
  --success-text: #A8F0D3;
  --link: #3D9BFF;

  /* surfaces */
  --card-bg: linear-gradient(150deg, rgba(4, 28, 74, .94) 0%, rgba(3, 20, 60, .955) 52%, rgba(2, 13, 42, .97) 100%);
  --field-bg: rgba(14, 30, 72, .8);
  --field-border: rgba(96, 134, 214, .38);
  --field-border-hover: rgba(128, 176, 255, .58);

  /* shape */
  --radius-card: 2.1rem;
  --radius-field: .65rem;
  --radius-btn: .65rem;

  /* depth */
  --shadow-card: 0 30px 80px rgba(0, 4, 20, .5), 0 0 34px rgba(22, 120, 255, .42), 0 0 90px rgba(22, 120, 255, .2), inset 0 1px 0 rgba(255, 255, 255, .10), inset 0 0 46px rgba(22, 120, 255, .08);
  --glow-focus: 0 0 0 3px rgba(22, 120, 255, .3), 0 0 20px rgba(22, 120, 255, .28);

  --font: "Sarabun", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --page-x: 3.95vw;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: clamp(13px, min(.957vw, 1.7vh), 18px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.auth-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

.auth-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }

:focus-visible { outline: 2px solid #7DBBFF; outline-offset: 3px; border-radius: .3rem; }

[hidden] { display: none !important; }

/* ---------- background ---------- */
.auth-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg-0); container-type: size; --bg-x: 50%; --bg-y: 72%; }
/* the photograph at "cover" size (1672x941 = 16:9-ish), its --bg-x / --bg-y point pinned to the same point of the window */
.auth-bg-stage {
  position: absolute;
  left: var(--bg-x);
  top: var(--bg-y);
  width: max(100vw, 177.69vh);
  width: max(100cqw, 177.69cqh);
  aspect-ratio: 1672 / 941;
  transform: translate(calc(var(--bg-x) * -1), calc(var(--bg-y) * -1));
}
.auth-bg-photo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* the neon "Panasonic" sign of the building -- in the photograph's coordinates (percentages of the stage) */
.auth-bg-sign {
  position: absolute;
  left: 49.3%;
  top: 41.6%;
  width: 14.6%;
  height: auto;
  overflow: visible;
  fill: #1E80FF;
  transform-origin: 0 0;
  transform: perspective(700px) rotateY(34deg) skewY(22deg);   /* upright letters on a sloping baseline, narrowing away to the right */
  filter: drop-shadow(0 0 1.5px rgba(150, 205, 255, .4)) drop-shadow(0 0 8px rgba(30, 110, 255, .55));
  pointer-events: none;
}
.auth-bg-sign-side { fill: #0A3C9E; }   /* the thickness of the letters: a darker copy shifted down-right behind the front face */
.auth-bg-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 11, 36, .55) 0%, rgba(2, 11, 36, 0) 18%),
    radial-gradient(58% 56% at 9% 24%, rgba(2, 11, 36, .8) 0%, rgba(2, 11, 36, .52) 52%, rgba(2, 11, 36, 0) 100%),
    radial-gradient(44% 66% at 84% 52%, rgba(2, 11, 36, .3), rgba(2, 11, 36, 0) 100%);
}
/* the centred recovery pages let the photograph breathe */
.auth-body--center .auth-bg-shade {
  background:
    linear-gradient(180deg, rgba(2, 11, 36, .55) 0%, rgba(2, 11, 36, 0) 22%),
    radial-gradient(60% 70% at 50% 52%, rgba(2, 11, 36, .45), rgba(2, 11, 36, 0) 100%);
}

/* ---------- header (shared by every page) ---------- */
.auth-header {
  position: relative;
  z-index: 3;
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .65rem 5.5vw .35rem 3.4vw;
  background: linear-gradient(90deg, rgba(0, 9, 32, .94) 0%, rgba(2, 18, 56, .86) 58%, rgba(4, 28, 82, .86) 100%);
  border-bottom: 1px solid rgba(86, 146, 255, .38);
  box-shadow: 0 10px 34px rgba(0, 6, 26, .4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.auth-brand { display: flex; align-items: center; min-width: 0; }
.auth-logo { width: 10.3rem; height: auto; flex: none; fill: currentColor; color: #fff; display: block; }
.auth-brand-rule { width: 1px; height: 2.5rem; margin: 0 1.1rem; flex: none; background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .5) 18%, rgba(255, 255, 255, .5) 82%, rgba(255, 255, 255, 0)); }
.auth-brand-text { min-width: 0; }
.auth-brand-title { margin: 0; font-size: 1.375rem; font-weight: 600; line-height: 1.12; letter-spacing: .01em; }
.auth-brand-sub { margin: .2rem 0 0; font-size: max(11.5px, .875rem); line-height: 1.25; color: var(--text-2); }

.auth-tags { display: flex; align-items: center; gap: 1.2rem; flex: none; font-size: max(11px, .8125rem); font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: #E2EBFF; white-space: nowrap; }
.auth-tags i { width: 1px; height: 1.3rem; background: var(--accent); }
.auth-stripes { width: 4.8rem; height: 1.25rem; margin-right: .2rem; flex: none; }

/* ---------- layout ---------- */
.auth-main {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 1.5rem var(--page-x) 1.5rem;
}
.auth-main--center { justify-content: center; }
.auth-body--register { --page-x: 2.7vw; }
.auth-body--register .auth-main { padding-left: 3.95vw; }

/* ---------- hero (login / register) ---------- */
.auth-hero { flex: 1 1 auto; min-width: 0; max-width: 40rem; align-self: flex-start; margin-top: 2rem; text-shadow: 0 2px 18px rgba(0, 8, 30, .55); }
.auth-hero-bar { display: block; width: 3rem; height: .25rem; margin-bottom: 1.1rem; border-radius: 2px; background: linear-gradient(90deg, #0068FE, #1C8CFF); box-shadow: 0 0 14px rgba(22, 120, 255, .75); }
.auth-hero-eyebrow { margin: 0 0 .6rem; font-size: 1rem; font-weight: 400; letter-spacing: .46em; text-transform: uppercase; color: #E6EEFF; }
.auth-hero-title { margin: 0; font-size: 3.35rem; font-weight: 700; line-height: 1.02; letter-spacing: .03em; text-transform: uppercase; }
.auth-hero-title span { display: block; }
.auth-hero-title .auth-grad {
  color: #2FC8FF;
  background: linear-gradient(90deg, #3DA9FC 0%, #12D6FF 55%, #00E5FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  width: fit-content;
}
.auth-hero-text { margin: .7rem 0 .9rem; max-width: 31rem; font-size: 1.375rem; line-height: 1.28; color: #D3DFF6; }

.auth-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 8.1rem)); justify-items: start; }
.auth-feature { width: 4rem; display: flex; flex-direction: column; align-items: center; }
.auth-feature-tile {
  width: 4rem;
  height: 3.75rem;
  display: grid;
  place-items: center;
  color: #2F93FF;
  border: 1px solid rgba(48, 132, 255, .85);
  border-radius: .8rem;
  background: linear-gradient(160deg, rgba(16, 58, 150, .6), rgba(4, 24, 76, .6));
  box-shadow: 0 0 18px rgba(22, 120, 255, .32), inset 0 0 16px rgba(22, 120, 255, .2);
}
.auth-feature-tile .ico { width: 1.9rem; height: 1.9rem; stroke-width: 1.9; }
.auth-feature-label { margin-top: .6rem; font-size: 1rem; line-height: 1.18; text-align: center; color: #fff; white-space: nowrap; }
.auth-feature-label span { display: block; }

/* ---------- card ---------- */
.auth-card {
  position: relative;
  flex: none;
  width: 35rem;
  max-width: 100%;
  padding: 5rem 4.125rem 3.1rem;
  border-radius: var(--radius-card);
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  animation: auth-rise .5s cubic-bezier(.2, .7, .2, 1) both;
}
/* thin electric-blue outline, brighter at the top-left corner */
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(150, 210, 255, 1) 0%, rgba(62, 142, 255, .78) 26%, rgba(30, 100, 226, .42) 56%, rgba(50, 136, 246, .72) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.auth-card--register { width: 39rem; padding: 2.25rem 2.25rem 1.6rem; --radius-card: 1.9rem; }
.auth-card--recovery { width: 34rem; padding: 2.3rem 3rem 2.6rem; text-align: center; --radius-card: 1.9rem; }

.auth-title { margin: 0; font-size: 2.5rem; font-weight: 700; line-height: 1.1; letter-spacing: .005em; }
.auth-subtitle { margin: .4rem 0 2.45rem; font-size: 1.3rem; line-height: 1.25; color: var(--text-2); }
.auth-lede { margin: .7rem auto 1.75rem; max-width: 27rem; font-size: 1.15rem; line-height: 1.35; color: var(--text-2); }
.auth-card--recovery .auth-title { font-size: 2.1rem; }

.auth-card-head { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.1rem; }
.auth-card-head .auth-title { font-size: 1.9rem; line-height: 1.1; font-weight: 600; }
.auth-card-head .auth-subtitle { margin: .2rem 0 0; font-size: 1.1rem; }
.auth-tile { width: 4.4rem; height: 4.4rem; flex: none; display: grid; place-items: center; color: #fff; border-radius: 1rem; background: linear-gradient(160deg, #1B79FF 0%, #0A4BD6 55%, #0431B8 100%); box-shadow: 0 8px 22px rgba(22, 120, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .35); }
.auth-tile .ico { width: 2.1rem; height: 2.1rem; }

.auth-seal {
  width: 7.25rem;
  height: 7.25rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  border: 1.5px solid rgba(70, 150, 255, .95);
  background: radial-gradient(circle at 50% 38%, rgba(28, 100, 240, .6), rgba(5, 26, 82, .9) 72%);
  box-shadow: 0 0 0 .45rem rgba(22, 120, 255, .09), 0 0 36px rgba(22, 120, 255, .55), inset 0 0 24px rgba(70, 150, 255, .38);
}
.auth-seal .ico { width: 3.2rem; height: 3.2rem; stroke-width: 1.5; }

/* ---------- forms ---------- */
.auth-form { margin: 0; }
.auth-field { margin: 0 0 1.85rem; min-width: 0; text-align: left; }
.auth-field > label { display: block; margin: 0 0 .5rem; font-size: 1rem; font-weight: 500; line-height: 1.2; color: #E7EEFF; }
.auth-req { color: var(--danger); margin-left: .15rem; }

.auth-control {
  position: relative;
  display: flex;
  align-items: center;
  height: 3.2rem;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-field);
  background: var(--field-bg);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.auth-control:hover { border-color: var(--field-border-hover); }
.auth-control:focus-within { border-color: var(--blue); background: rgba(5, 28, 82, .86); box-shadow: var(--glow-focus); }
.auth-control > .ico { margin: 0 .75rem 0 .95rem; color: #A9BFE8; transition: color .18s ease; }
.auth-control:focus-within > .ico { color: #5FA9FF; }
.auth-control input, .auth-control select {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 .9rem 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 1.06rem;
  line-height: 1.2;
}
.auth-control input::placeholder { color: #8FA6D1; opacity: 1; }
.auth-control select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 2.4rem; text-overflow: ellipsis; }
.auth-control select:required:invalid { color: #8FA6D1; }
.auth-control select option { background: #06173F; color: #fff; }
.auth-control .auth-chevron { position: absolute; right: .85rem; width: 1.1rem; height: 1.1rem; color: #B6C9EA; pointer-events: none; }
.auth-control input:-webkit-autofill, .auth-control input:-webkit-autofill:hover, .auth-control input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  box-shadow: 0 0 0 100px #06245E inset;
  border-radius: calc(var(--radius-field) - 1px);
  transition: background-color 9999s ease-out 0s;
}

.auth-pw-toggle { flex: none; width: 2.4rem; height: 2.4rem; margin: 0 .4rem 0 0; display: grid; place-items: center; padding: 0; border: 0; border-radius: .5rem; background: transparent; color: #B6C9EA; cursor: pointer; transition: color .15s ease, background-color .15s ease; }
.auth-pw-toggle:hover { color: #fff; background: rgba(120, 170, 255, .14); }
.auth-pw-toggle[aria-pressed="true"] { color: #5FB0FF; }

.auth-field.is-invalid .auth-control { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 100, 124, .18); }
.auth-field.is-invalid .auth-control:focus-within { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 100, 124, .3); }
.auth-field-error { display: flex; align-items: flex-start; gap: .4rem; margin: .4rem 0 0; font-size: .875rem; line-height: 1.3; color: var(--danger-text); }
.auth-field-error .ico { width: 1rem; height: 1rem; margin-top: .1rem; color: var(--danger); }

.auth-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; margin: -.1rem 0 1.75rem; font-size: 1rem; }
.auth-links { display: flex; gap: .4rem 1.1rem; flex-wrap: wrap; justify-content: flex-end; }

.auth-check { position: relative; display: inline-flex; align-items: center; gap: .65rem; color: #E7EEFF; cursor: pointer; user-select: none; }
.auth-check input { position: absolute; width: 1.25rem; height: 1.25rem; margin: 0; opacity: 0; cursor: pointer; }
.auth-check-box { width: 1.25rem; height: 1.25rem; flex: none; display: grid; place-items: center; border: 1.5px solid #5B90EC; border-radius: .3rem; background: rgba(4, 20, 60, .7); color: #fff; transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.auth-check-box .ico { width: .9rem; height: .9rem; stroke-width: 3; opacity: 0; transform: scale(.6); transition: opacity .12s ease, transform .12s ease; }
.auth-check input:checked + .auth-check-box { background: var(--blue); border-color: var(--blue); box-shadow: 0 0 12px rgba(22, 120, 255, .55); }
.auth-check input:checked + .auth-check-box .ico { opacity: 1; transform: none; }
.auth-check input:focus-visible + .auth-check-box { outline: 2px solid #7DBBFF; outline-offset: 3px; }

/* register: two columns on desktop */
.auth-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 1.25rem; }
.auth-grid .auth-field { margin: 0; }
.auth-span-2 { grid-column: 1 / -1; }
.auth-grid .auth-control { height: 2.75rem; }
.auth-grid .auth-field > label { margin-bottom: .4rem; }
.auth-grid .auth-btn { margin-top: 0; }

/* ---------- buttons ---------- */
.auth-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.auth-btn:hover { text-decoration: none; }
.auth-btn--primary {
  height: 3.8rem;
  font-size: 1.3rem;
  color: #fff;
  background: linear-gradient(180deg, #0A7CFF 0%, #0063FE 28%, #004FFD 60%, #0044F2 100%);   /* white label on it: >= 4.5:1 over the whole height of the text */
  box-shadow: 0 10px 26px rgba(22, 120, 255, .4), inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -1px 0 rgba(0, 20, 90, .35);
}
.auth-btn--primary:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 14px 32px rgba(22, 120, 255, .52), inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(0, 20, 90, .35); }
.auth-btn--primary:active { filter: brightness(.94); transform: translateY(0); box-shadow: 0 6px 16px rgba(22, 120, 255, .4), inset 0 2px 4px rgba(0, 20, 90, .35); }
.auth-btn--primary .ico { width: 1.4rem; height: 1.4rem; stroke-width: 2; }
.auth-grid .auth-btn--primary { height: 3.5rem; font-size: 1.25rem; }
.auth-btn--google { height: 3.45rem; font-size: 1.2rem; color: #1B2433; background: #fff; box-shadow: 0 6px 18px rgba(0, 10, 40, .25); }
.auth-btn--google:hover { background: #EEF3FF; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0, 10, 40, .32); }
.auth-btn--google:active { transform: translateY(0); background: #E3EBFF; }
.auth-btn--google .ico-google { width: 1.55rem; height: 1.55rem; stroke: none; }
.auth-btn:disabled, .auth-btn.is-busy { cursor: not-allowed; filter: saturate(.7); transform: none; opacity: .72; }
.auth-btn.is-busy { cursor: progress; }
.auth-spinner { display: none; width: 1.15rem; height: 1.15rem; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: auth-spin .75s linear infinite; }
.auth-btn.is-busy .auth-spinner { display: inline-block; }
.auth-btn.is-busy .ico-go { display: none; }

.auth-or { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0 1.4rem; font-size: .9375rem; letter-spacing: .08em; color: #9FB4DC; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(150, 180, 235, 0), rgba(150, 180, 235, .42)); }
.auth-or::after { transform: scaleX(-1); }
.auth-switch { margin: 1.95rem 0 0; font-size: 1.2rem; text-align: center; color: var(--text-2); }
.auth-switch a { font-weight: 500; }
.auth-switch .ico { width: 1.1em; height: 1.1em; vertical-align: -.2em; }
.auth-grid ~ .auth-or { margin: .7rem 0 .75rem; }
.auth-card--register .auth-btn--google { height: 3.4rem; }
.auth-card--register .auth-switch { margin-top: 1.5rem; font-size: 1.1rem; }
.auth-card--recovery .auth-switch { margin-top: 1.9rem; font-size: 1.1rem; }
.auth-card--recovery .auth-btn--primary { height: 3.65rem; font-size: 1.2rem; }
.auth-card--recovery .auth-control { height: 3.5rem; }
.auth-card--recovery .auth-field { margin-bottom: 1.5rem; }
/* the taller recovery cards (reset password: four boxes; complete profile: three) -- tighter, so they still fit a laptop screen */
.auth-card--compact { padding-top: 1.9rem; padding-bottom: 1.8rem; }
.auth-card--compact .auth-seal { width: 5rem; height: 5rem; margin-bottom: .6rem; }
.auth-card--compact .auth-seal .ico { width: 2.3rem; height: 2.3rem; }
.auth-card--compact .auth-title { font-size: 1.8rem; }
.auth-card--compact .auth-lede { margin: .45rem auto 1.2rem; font-size: 1.05rem; }
.auth-card--compact .auth-field { margin-bottom: 1.1rem; }
.auth-card--compact .auth-control { height: 3.1rem; }
.auth-card--compact .auth-btn--primary { height: 3.3rem; }
.auth-card--compact .auth-switch { margin-top: 1.3rem; }

/* ---------- alerts ---------- */
.auth-alert { display: flex; align-items: flex-start; gap: .6rem; margin: 0 0 1.2rem; padding: .7rem .9rem; border: 1px solid; border-radius: .65rem; font-size: .95rem; line-height: 1.4; text-align: left; }
.auth-alert .ico { width: 1.15rem; height: 1.15rem; margin-top: .12rem; }
.auth-alert--error { color: var(--danger-text); background: rgba(255, 100, 124, .1); border-color: rgba(255, 100, 124, .55); }
.auth-alert--error .ico { color: var(--danger); }
.auth-alert--success { color: var(--success-text); background: rgba(22, 199, 132, .1); border-color: rgba(22, 199, 132, .5); }
.auth-alert--success .ico { color: var(--success); }
.auth-alert a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }

/* ---------- motion ---------- */
@keyframes auth-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes auth-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .auth-spinner { animation: none; border-top-color: rgba(255, 255, 255, .35); }
  .auth-btn--primary:hover, .auth-btn--google:hover { transform: none; }
}

/* ---------- narrow laptops / landscape tablets: the two columns shrink with the window ---------- */
@media (max-width: 1000px) {
  .auth-tags { display: none; }
}
@media (pointer: coarse) {
  .auth-control { min-height: 44px; }
  .auth-pw-toggle { min-width: 44px; min-height: 44px; }
}

/* Windows high-contrast mode drops the glass, the gradients and the glow: give the shapes real borders so they stay readable */
@media (forced-colors: active) {
  .auth-card, .auth-control, .auth-alert, .auth-feature-tile { border: 1px solid CanvasText; }
  .auth-btn { border: 1px solid ButtonText; }
  .auth-card::before { display: none; }
  .auth-hero-title .auth-grad { background: none; -webkit-text-fill-color: currentColor; }
}

/* ---------- tablet portrait and below: one column, fixed type scale ---------- */
@media (max-width: 900px) {
  html { font-size: 16px; }
  .auth-header { padding: .6rem 1.5rem; }
  .auth-main, .auth-body--register .auth-main { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 1.75rem; padding: 1.75rem 1.5rem 2.5rem; }
  .auth-main--center { justify-content: center; align-items: center; }
  .auth-hero { max-width: 40rem; width: 100%; margin: 0 auto; align-self: auto; }
  .auth-hero-title { font-size: 2.6rem; }
  .auth-hero-text { max-width: 36rem; font-size: 1.15rem; margin-bottom: 0; }
  .auth-features { display: none; }
  .auth-card, .auth-card--register, .auth-card--recovery { width: min(100%, 36rem); margin: 0 auto; }
  .auth-card { padding: 2.75rem 2.5rem 2.25rem; }
  .auth-card--register { padding: 2rem 2rem 1.75rem; }
  .auth-card--recovery { padding: 2.25rem 2.25rem 2rem; }
  .auth-body--center .auth-bg-shade { background: linear-gradient(180deg, rgba(2, 11, 36, .55) 0%, rgba(2, 11, 36, .25) 100%); }
  .auth-bg-shade { background: linear-gradient(180deg, rgba(2, 11, 36, .72) 0%, rgba(2, 11, 36, .5) 55%, rgba(2, 11, 36, .62) 100%); }
  .auth-bg { --bg-x: 58%; --bg-y: 60%; }
}

@media (max-width: 700px) {
  .auth-header { gap: .75rem; padding: .6rem 1rem; }
  .auth-logo { width: 7.2rem; }
  .auth-brand-rule { margin: 0 .75rem; height: 2rem; }
  .auth-brand-title { font-size: 1.05rem; }
  .auth-brand-sub { font-size: .7rem; }
  .auth-main, .auth-body--register .auth-main { padding: 1.25rem 1rem 2rem; gap: 1.25rem; }
  .auth-hero-bar { margin-bottom: 1rem; }
  .auth-hero-eyebrow { margin-bottom: .6rem; font-size: .8rem; letter-spacing: .32em; }
  .auth-hero-title { font-size: 1.85rem; }
  .auth-hero-text, .auth-features { display: none; }
  .auth-card { padding: 2rem 1.35rem 1.75rem; --radius-card: 1.5rem; }
  .auth-card--register { padding: 1.5rem 1.25rem 1.5rem; }
  .auth-card--recovery { padding: 1.75rem 1.35rem 1.6rem; }
  .auth-title { font-size: 2rem; }
  .auth-card--recovery .auth-title { font-size: 1.75rem; }
  .auth-subtitle { font-size: 1.1rem; margin-bottom: 1.5rem; }
  .auth-lede { font-size: 1.02rem; }
  .auth-control, .auth-grid .auth-control, .auth-card--recovery .auth-control { height: 3rem; }
  .auth-grid { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
  .auth-btn--primary, .auth-grid .auth-btn--primary, .auth-card--recovery .auth-btn--primary { height: 3.3rem; font-size: 1.15rem; }
  .auth-btn--google { height: 3.1rem; font-size: 1.05rem; }
  .auth-switch, .auth-card--register .auth-switch, .auth-card--recovery .auth-switch { font-size: 1rem; }
  .auth-seal { width: 5.5rem; height: 5.5rem; }
  .auth-seal .ico { width: 2.6rem; height: 2.6rem; }
  .auth-tile { width: 3.6rem; height: 3.6rem; }
  .auth-card-head .auth-title { font-size: 1.55rem; }
  .auth-card-head .auth-subtitle { font-size: 1rem; }
  .auth-row { font-size: .95rem; }
}

@media (max-width: 380px) {
  .auth-brand-rule { display: none; }
  .auth-brand-text { margin-left: .75rem; }
}

/* ---------- round 36: phones, tablets, notches, other apps' browsers ---------- */
/* the notice shown inside LINE / Facebook / Instagram ... (templates/auth_inapp_notice.html, static/auth/auth.js) */
.auth-alert--warn { color: #FFE2A8; background: rgba(255, 176, 32, .1); border-color: rgba(255, 176, 32, .55); }
.auth-alert--warn .ico { color: #FFB020; }
.auth-alert--warn.is-flash { animation: auth-flash .9s ease-out 1; }
@keyframes auth-flash { 0% { box-shadow: 0 0 0 0 rgba(255, 176, 32, .75); } 100% { box-shadow: 0 0 0 .8rem rgba(255, 176, 32, 0); } }
.auth-alert-text p { margin: 0 0 .5rem; }
.auth-alert-text p:last-child { margin-bottom: 0; }
.auth-inapp-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.auth-mini-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.5rem; padding: .35rem .85rem; border: 1px solid rgba(255, 176, 32, .6); border-radius: .5rem; background: rgba(255, 255, 255, .08); color: inherit; font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; }
.auth-mini-btn:hover { background: rgba(255, 255, 255, .16); }
.auth-mini-btn[hidden] { display: none; }
/* the notice under the Google button of a page that is neither https nor this laptop, when the server has no public https address yet (templates/auth_google_note.html) */
.auth-alert--under-button { margin: .9rem 0 0; }

/* a finger, not a mouse: no 300 ms tap delay, and a box of 16 px or more so that iOS does not zoom the page in when a box is touched */
a, button, input, select, label { touch-action: manipulation; }
@media (pointer: coarse) {
  .auth-control input, .auth-control select { font-size: max(1.06rem, 16px); }
  .auth-check { min-height: 44px; }
  .auth-links a, .auth-switch a { display: inline-block; padding: .25rem 0; }
}

/* the notch of a phone and its rounded corners: the page runs edge to edge (viewport-fit=cover) and keeps its content out of them */
body.auth-body {
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
}

/* a phone held upright: the form is what the visitor came for, so it starts right under the header (the slogan shrinks to one line of the hero; before, the form began 80 % down the screen) */
@media (max-width: 700px) {
  .auth-hero { margin-top: 0; }
  .auth-hero-bar, .auth-hero-eyebrow { display: none; }
  .auth-hero-title { font-size: 1.45rem; letter-spacing: .02em; }
  .auth-main, .auth-body--register .auth-main { gap: .85rem; padding-top: .85rem; }
}

/* a phone held sideways is only ~360 px high: a smaller card, no wasted space above it */
@media (max-height: 520px) and (orientation: landscape) {
  .auth-card, .auth-card--register, .auth-card--recovery { padding-top: 1.1rem; padding-bottom: 1.1rem; }
  .auth-title, .auth-card--recovery .auth-title { font-size: 1.5rem; }
  .auth-subtitle { margin-bottom: .8rem; }
  .auth-hero-title { font-size: 1.5rem; }
  .auth-seal { display: none; }
}
