/* =========================================================
   Auth — forest-teal, quiet cinema, premium motion
   ========================================================= */
:root {
  --px-ink: #0f172a;
  --px-ink-soft: #334155;
  --px-muted: #64748b;
  --px-line: rgba(15, 23, 42, 0.10);
  --px-surface: #ffffff;
  --px-accent: #0CAF60;
  --px-accent-deep: #08964f;
  --px-accent-mid: #34d399;
  --px-accent-soft: rgba(12, 175, 96, 0.12);
  --px-accent-ring: rgba(12, 175, 96, 0.24);
  --px-accent-glow: rgba(12, 175, 96, 0.35);
  --px-font: 'Figtree', system-ui, sans-serif;
  --px-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --px-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --px-radius: 18px;
}

.ap-auth.theme-1, .ap-auth { --px-accent:#0CAF60; --px-accent-deep:#08964f; --px-accent-mid:#34d399; --px-accent-soft:rgba(12,175,96,.12); --px-accent-ring:rgba(12,175,96,.24); --px-accent-glow:rgba(12,175,96,.35); }
.ap-auth.theme-2 { --px-accent:#75C251; --px-accent-deep:#5ea63c; --px-accent-mid:#a3e635; --px-accent-soft:rgba(117,194,81,.12); --px-accent-ring:rgba(117,194,81,.24); --px-accent-glow:rgba(117,194,81,.35); }
.ap-auth.theme-3 { --px-accent:#6fd943; --px-accent-deep:#4ade80; --px-accent-mid:#86efac; --px-accent-soft:rgba(111,217,67,.12); --px-accent-ring:rgba(111,217,67,.24); --px-accent-glow:rgba(111,217,67,.35); }
.ap-auth.theme-4 { --px-accent:#145388; --px-accent-deep:#0f3d66; --px-accent-mid:#38bdf8; --px-accent-soft:rgba(20,83,136,.12); --px-accent-ring:rgba(20,83,136,.24); --px-accent-glow:rgba(20,83,136,.35); }
.ap-auth.theme-5 { --px-accent:#B9406B; --px-accent-deep:#9d174d; --px-accent-mid:#f472b6; --px-accent-soft:rgba(185,64,107,.12); --px-accent-ring:rgba(185,64,107,.24); --px-accent-glow:rgba(185,64,107,.35); }
.ap-auth.theme-6 { --px-accent:#008ECC; --px-accent-deep:#0369a1; --px-accent-mid:#38bdf8; --px-accent-soft:rgba(0,142,204,.12); --px-accent-ring:rgba(0,142,204,.24); --px-accent-glow:rgba(0,142,204,.35); }
.ap-auth.theme-7 { --px-accent:#FB8C00; --px-accent-deep:#c2410c; --px-accent-mid:#fdba74; --px-accent-soft:rgba(251,140,0,.12); --px-accent-ring:rgba(251,140,0,.24); --px-accent-glow:rgba(251,140,0,.35); }
.ap-auth.theme-8 { --px-accent:#008081; --px-accent-deep:#0f766e; --px-accent-mid:#2dd4bf; --px-accent-soft:rgba(0,128,129,.12); --px-accent-ring:rgba(0,128,129,.24); --px-accent-glow:rgba(0,128,129,.35); }
.ap-auth.theme-9 { --px-accent:#48494B; --px-accent-deep:#27272a; --px-accent-mid:#a1a1aa; --px-accent-soft:rgba(72,73,75,.12); --px-accent-ring:rgba(72,73,75,.24); --px-accent-glow:rgba(72,73,75,.35); }
.ap-auth.custom-color {
  --px-accent: var(--color-customColor);
  --px-accent-deep: var(--color-customColor);
  --px-accent-mid: var(--color-customColor);
  --px-accent-soft: color-mix(in srgb, var(--color-customColor) 14%, white);
  --px-accent-ring: color-mix(in srgb, var(--color-customColor) 28%, transparent);
  --px-accent-glow: color-mix(in srgb, var(--color-customColor) 40%, transparent);
}

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

html, body.ap-auth {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--px-font);
  color: #f8fafc;
  background: #0f172a;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.ap-stage {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 1rem clamp(1rem, 3vw, 2.5rem) 1.15rem;
}

.ap-bg, .ap-bg__slide, .ap-bg__veil, .ap-orbs, .ap-grain {
  position: absolute;
  inset: 0;
}
.ap-bg { z-index: 0; overflow: hidden; pointer-events: none; }
.ap-bg__slide {
  background: #0f172a center / cover no-repeat;
  transform: scale(1.05);
  opacity: 0;
  transition: opacity 1.35s var(--px-ease);
  will-change: opacity, transform;
  animation: apKen 56s ease-in-out infinite alternate;
}
.ap-bg__slide.is-on { opacity: 1; }
.ap-bg__veil {
  background:
    radial-gradient(900px 520px at 50% 42%, transparent 0%, rgba(15, 23, 42, 0.28) 58%, rgba(15, 23, 42, 0.72) 100%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.5) 0%, rgba(15, 23, 42, 0.12) 36%, rgba(15, 23, 42, 0.7) 100%);
}
@keyframes apKen {
  from { transform: scale(1.05) translate3d(0, 0, 0); }
  to { transform: scale(1.13) translate3d(-1.4%, -0.9%, 0); }
}

.ap-orbs i {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.34;
  animation: apOrb 18s ease-in-out infinite alternate;
}
.ap-orbs i:nth-child(1) {
  width: 280px; height: 280px; left: 8%; top: 18%;
  background: var(--px-accent);
}
.ap-orbs i:nth-child(2) {
  width: 220px; height: 220px; right: 10%; bottom: 16%;
  background: var(--px-accent-mid);
  animation-delay: -6s;
  animation-duration: 22s;
}
.ap-orbs i:nth-child(3) {
  width: 160px; height: 160px; left: 42%; top: 8%;
  background: #fff;
  opacity: 0.12;
  animation-delay: -11s;
  animation-duration: 26s;
}
@keyframes apOrb {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(8%, -10%, 0) scale(1.18); }
}

.ap-grain {
  z-index: 1;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  animation: apGrain .45s steps(2) infinite;
}
@keyframes apGrain {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-1.5%, 1.2%); }
}

.ap-top, .ap-center, .ap-bing { position: relative; z-index: 1; }

.ap-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  overflow: visible;
  z-index: 80;
  animation: apFadeDown .7s var(--px-ease) both;
}
@keyframes apFadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
.ap-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: #fff;
  min-width: 0;
}
.ap-brand img {
  width: 72px; height: 72px; object-fit: contain;
  background: #fff;
  border-radius: 18px;
  padding: 8px;
  box-shadow: 0 12px 24px -12px rgba(0,0,0,.5);
  transition: transform .45s var(--px-ease);
}
.ap-brand:hover img { transform: rotate(-6deg) scale(1.05); }
.ap-brand strong {
  display: block;
  font-family: var(--px-display);
  font-size: 1.22rem;
  letter-spacing: -0.03em;
}
.ap-brand em {
  display: block;
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--px-accent-mid);
  font-weight: 700;
}
.ap-top__mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}
.ap-top__clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}
.ap-flipclock {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 0.78rem 1.28rem;
  border-radius: 1.15rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.02) 38%, rgba(15,23,42,0.28) 100%),
    rgba(8, 15, 28, 0.42);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow:
    0 22px 48px -22px rgba(0,0,0,.72),
    0 0 0 1px rgba(12,175,96,0.12),
    inset 0 1px 0 rgba(255,255,255,0.16);
  backdrop-filter: blur(18px) saturate(1.15);
}
.ap-flipclock::before {
  content: "";
  position: absolute;
  inset: 0.35rem 0.45rem auto;
  height: 42%;
  border-radius: 0.8rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.14), transparent);
  pointer-events: none;
  z-index: 0;
}
.ap-flipclock__face {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.38rem;
}
.ap-flipclock__pair {
  position: relative;
  display: flex;
  gap: 0.22rem;
  padding-bottom: 0.08rem;
}
.ap-flipclock__pair small {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1.05rem;
  font-size: 0.52rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(248,250,252,0.48);
  font-weight: 700;
  pointer-events: none;
}
.ap-flip {
  --flip-w: 2.2rem;
  --flip-h: 2.95rem;
  position: relative;
  width: var(--flip-w);
  height: var(--flip-h);
  font-family: var(--px-display);
  font-weight: 800;
  font-size: 1.58rem;
  line-height: 1;
  color: #f8fafc;
  perspective: 320px;
  transform-style: preserve-3d;
  border-radius: 0.48rem;
  box-shadow:
    0 12px 20px -12px rgba(0,0,0,0.85),
    inset 0 1px 0 rgba(255,255,255,0.14);
  font-variant-numeric: tabular-nums;
}
.ap-flip__top,
.ap-flip__bot,
.ap-flip__flap {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  overflow: hidden;
}
.ap-flip__top,
.ap-flip__flap--top {
  top: 0;
  border-radius: 0.48rem 0.48rem 0 0;
  background: linear-gradient(180deg, #2a3a52 0%, #172338 100%);
}
.ap-flip__bot,
.ap-flip__flap--bot {
  bottom: 0;
  border-radius: 0 0 0.48rem 0.48rem;
  background: linear-gradient(180deg, #0d1626 0%, #070c16 100%);
}
.ap-flip__top span,
.ap-flip__flap--top span {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.ap-flip__bot span,
.ap-flip__flap--bot span {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 6px 10px rgba(0,0,0,0.4);
}
.ap-flip__seam {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  z-index: 6;
  height: 2px;
  margin-top: -1px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.72) 12%, rgba(0,0,0,0.72) 88%, transparent);
  box-shadow: 0 1px 0 rgba(255,255,255,0.10);
  pointer-events: none;
}
.ap-flip__seam::before,
.ap-flip__seam::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 5px;
  height: 8px;
  border-radius: 1px;
  background: linear-gradient(180deg, #94a3b8, #334155);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}
.ap-flip__seam::before { left: -2px; }
.ap-flip__seam::after { right: -2px; }
.ap-flip__flap--top {
  transform-origin: bottom center;
  backface-visibility: hidden;
  z-index: 4;
  box-shadow: 0 10px 16px -8px rgba(0,0,0,0.55);
}
.ap-flip__flap--bot {
  transform-origin: top center;
  transform: rotateX(90deg);
  backface-visibility: hidden;
  z-index: 3;
}
.ap-flip__flap--top.is-play {
  animation: apFlipTop 0.36s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}
.ap-flip__flap--bot.is-play {
  animation: apFlipBot 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes apFlipTop {
  0% { transform: rotateX(0deg); filter: brightness(1); }
  80% { filter: brightness(0.72); }
  100% { transform: rotateX(-90deg); filter: brightness(0.45); }
}
@keyframes apFlipBot {
  0% { transform: rotateX(90deg); filter: brightness(0.55); }
  100% { transform: rotateX(0deg); filter: brightness(1); }
}
.ap-flipclock__colon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.48rem;
  padding: 0 0.08rem 0.15rem;
  align-self: center;
}
.ap-flipclock__colon i {
  display: block;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: var(--px-accent-mid);
  box-shadow: 0 0 0 2px rgba(12,175,96,0.16), 0 0 12px var(--px-accent-glow);
  animation: apColonPulse 1s steps(1) infinite;
}
@keyframes apColonPulse {
  0%, 49% { opacity: 1; transform: scale(1); }
  50%, 100% { opacity: 0.28; transform: scale(0.86); }
}
.ap-flipclock__ampm {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  margin: 0 0 0.2rem 0.28rem;
}
.ap-flipclock__ampm span {
  min-width: 2.1rem;
  padding: 0.22rem 0.34rem;
  border-radius: 0.38rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-align: center;
  color: rgba(248,250,252,0.38);
  background: rgba(15,23,42,0.45);
  border: 1px solid rgba(255,255,255,0.08);
  transition: color .35s var(--px-ease), background .35s var(--px-ease), box-shadow .35s var(--px-ease), transform .35s var(--px-ease);
}
.ap-flipclock__ampm span.is-on {
  color: #042f1c;
  background: linear-gradient(180deg, var(--px-accent-mid), var(--px-accent));
  border-color: transparent;
  box-shadow: 0 8px 16px -10px var(--px-accent-glow);
  transform: translateY(-1px);
}
.ap-top__date {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.72);
}
.ap-top__clock em {
  display: block;
  margin-top: -0.08rem;
  font-style: normal;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--px-accent-mid);
  font-weight: 700;
}
.ap-wx {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.38);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  font-weight: 650;
  color: rgba(248, 250, 252, 0.88);
  animation: apFadeUp .7s .15s var(--px-ease) both;
}
.ap-wx i {
  color: var(--px-accent-mid);
  animation: apBob 3.4s ease-in-out infinite;
}
.ap-wx b { font-family: var(--px-display); font-size: 0.92rem; }
.ap-brief {
  max-width: 100%;
  margin-top: 0.15rem;
  padding: 0.5rem 0.85rem 0.6rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.46);
  border: 1px solid rgba(12, 175, 96, 0.28);
  backdrop-filter: blur(14px);
  text-align: center;
  animation: apFadeUp .7s .22s var(--px-ease) both;
}
.ap-brief__kicker {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--px-accent-mid);
  font-weight: 800;
  margin-bottom: 0.12rem;
}
.ap-brief strong {
  display: block;
  font-family: var(--px-display);
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: #fff;
  font-weight: 700;
}
.ap-brief p {
  margin: 0.22rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(248, 250, 252, 0.82);
  font-weight: 500;
}
@keyframes apBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

body.ap-auth main.ap-center,
.ap-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.35rem 0 1rem;
  text-align: center;
}
.ap-stage-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(26.5rem, 100%);
  max-width: 26.5rem;
  margin: 0 auto;
  gap: 0.75rem;
  text-align: center;
}
.ap-stage-mid > * {
  box-sizing: border-box;
}
.ap-stage-mid .ap-clockstack,
.ap-stage-mid .ap-brief,
.ap-stage-mid .ap-hud {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.ap-stage-mid .ap-flipclock {
  width: 100%;
  justify-content: center;
}
.ap-stage-mid .ap-wx {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}
.ap-stage-mid .ap-brief {
  max-width: 100%;
}

.ap-hud {
  position: relative;
  width: 100%;
  padding: 1.55rem 1.45rem 1.3rem;
  border-radius: var(--px-radius);
  background: var(--px-surface);
  color: var(--px-ink);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 28px 64px -28px rgba(15, 23, 42, 0.55);
  transform-style: preserve-3d;
  animation: apCardIn .8s .1s var(--px-ease) both;
  text-align: left;
  --mx: 50%;
  --my: 18%;
  --rx: 0deg;
  --ry: 0deg;
}
.ap-hud::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), var(--px-accent-soft), transparent 58%);
  opacity: 0.9;
  transition: opacity .3s ease;
}
.ap-hud.is-live {
  animation: none;
  transform: perspective(920px) rotateX(var(--ry)) rotateY(var(--rx));
  transition: transform .18s ease-out, box-shadow .35s ease;
}
.ap-hud.is-live:hover {
  box-shadow: 0 32px 70px -24px rgba(15, 23, 42, 0.6), 0 0 0 1px var(--px-accent-ring);
}
@keyframes apCardIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.ap-hud h2, .ap-hello {
  margin: 0 0 0.2rem;
  font-family: var(--px-display);
  font-size: clamp(1.45rem, 1.15rem + 1vw, 1.8rem);
  letter-spacing: -0.04em;
  color: var(--px-ink);
  animation: apFadeUp .7s .22s var(--px-ease) both;
}
.ap-hud__body { position: relative; z-index: 1; }
.ap-hud .ap-sub {
  margin: 0 0 1.15rem;
  color: var(--px-muted);
  font-size: 0.92rem;
  font-weight: 500;
  min-height: 1.35em;
  animation: apFadeUp .7s .3s var(--px-ease) both;
  transition: opacity .2s ease;
}
@keyframes apFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.ap-alert {
  margin: 0 0 0.9rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.84rem;
  font-weight: 650;
  animation: apShake .45s var(--px-ease);
}
@keyframes apShake {
  0%, 100% { transform: none; }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.ap-form .form-label, .ap-hud .form-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--px-ink-soft);
}
.ap-input { position: relative; }
.ap-input > i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--px-muted); z-index: 2; pointer-events: none;
  transition: color .2s ease, transform .2s var(--px-ease);
}
.ap-input:focus-within > i {
  color: var(--px-accent);
  transform: translateY(-50%) scale(1.08);
}
.ap-hud .form-control, .ap-card .form-control {
  border-radius: 12px !important;
  min-height: 48px;
  background: #f8fafc !important;
  border: 1px solid var(--px-line) !important;
  color: var(--px-ink) !important;
  box-shadow: none !important;
  font-weight: 550;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.ap-input .form-control { padding-left: 2.45rem !important; padding-right: 2.5rem !important; }
.ap-hud .form-control::placeholder { color: #94a3b8; }
.ap-hud .form-control:focus {
  border-color: var(--px-accent) !important;
  box-shadow: 0 0 0 4px var(--px-accent-ring) !important;
  background: #fff !important;
}
.ap-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; background: transparent;
  color: var(--px-muted); border-radius: 10px; z-index: 2;
  transition: color .2s ease, background .2s ease, transform .2s var(--px-ease);
}
.ap-eye:hover { color: var(--px-ink); background: var(--px-accent-soft); }
.ap-eye:active { transform: translateY(-50%) scale(.92); }
.ap-caps {
  display: none;
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--px-accent-deep);
}
.ap-caps.is-on {
  display: block;
  animation: apFadeUp .28s var(--px-ease) both;
}
.ap-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.6rem; margin: 0.1rem 0 0.9rem;
}
.ap-remember {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; font-weight: 600; color: var(--px-ink-soft); margin: 0; cursor: pointer;
}
.ap-remember input { accent-color: var(--px-accent); }
.ap-hud a.text-primary, .ap-hud a { color: var(--px-accent-deep) !important; font-weight: 700; text-decoration: none; }
.ap-hud a:hover { text-decoration: underline; }

.ap-hud .btn-primary, .ap-hud .login_button {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, var(--px-accent-mid) 0%, var(--px-accent) 45%, var(--px-accent-deep) 100%) !important;
  border: 0 !important;
  border-radius: 12px !important;
  min-height: 48px;
  font-weight: 700 !important;
  color: #fff !important;
  box-shadow: 0 12px 24px -12px var(--px-accent-glow);
  transition: transform .2s var(--px-ease), filter .2s ease, box-shadow .2s ease;
}
.ap-hud .login_button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.32) 50%, transparent 62%);
  transform: translateX(-130%);
  pointer-events: none;
}
.ap-hud .login_button:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 16px 28px -12px var(--px-accent-glow);
}
.ap-hud .login_button:hover::after { animation: apShimmer .85s var(--px-ease); }
.ap-hud .login_button:active,
.ap-hud .login_button.is-press { transform: translateY(0) scale(.985); }
.ap-hud .login_button.is-busy {
  opacity: 0.78;
  pointer-events: none;
}
.ap-hud .login_button.is-busy .ap-btn-label::after {
  content: "";
  display: inline-block;
  width: 0.7em; height: 0.7em;
  margin-left: .5em;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -1px;
  animation: apSpin .7s linear infinite;
}
@keyframes apShimmer {
  from { transform: translateX(-130%); }
  to { transform: translateX(130%); }
}
@keyframes apSpin { to { transform: rotate(360deg); } }

.ap-sso {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  margin-top: 0.55rem; padding: 0.65rem;
  border-radius: 12px; border: 1px solid var(--px-line);
  color: var(--px-ink) !important; font-weight: 700; font-size: 0.86rem;
  background: #f8fafc;
  transition: background .2s ease, transform .2s var(--px-ease);
}
.ap-sso:hover { background: #fff; transform: translateY(-1px); }
.ap-alt { color: var(--px-muted); font-size: 0.86rem; }
.ap-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.ap-hud .card, .ap-hud .card-body {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: inherit;
}
.ap-hud .card-body { padding: 0 !important; }
.ap-hud .f-w-600 { color: var(--px-ink); }
.ap-hud .text-danger { color: #b91c1c !important; }
.ap-hud .alert { color: var(--px-ink); background: var(--px-accent-soft); border-color: var(--px-accent-ring); }

.ap-lang {
  position: relative;
  z-index: 40;
}
.ap-lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 80;
}
.ap-lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(15, 23, 42, 0.42);
  color: #fff !important;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  pointer-events: auto;
}
.ap-lang-pill.is-on {
  background: linear-gradient(180deg, #34d399, #0CAF60);
  border-color: transparent;
  color: #042f1c !important;
}
.ap-lang-pill:hover { transform: translateY(-1px); }
.ap-lang-more { position: relative; }
.ap-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(15, 23, 42, 0.4);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.38rem 0.8rem;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background .2s ease, transform .2s var(--px-ease);
}
.ap-lang-btn i { font-size: 0.9rem; opacity: 0.8; transition: transform .2s var(--px-ease); }
.ap-lang-switch.is-open .ap-lang-btn i { transform: rotate(180deg); }
.ap-lang-btn:hover, .ap-lang-switch.is-open .ap-lang-btn {
  background: rgba(15, 23, 42, 0.62);
  transform: translateY(-1px);
}
.ap-lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  min-width: 11.5rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border-radius: 12px;
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.6);
  z-index: 50;
}
.ap-lang-switch:hover .ap-lang-menu,
.ap-lang-switch:focus-within .ap-lang-menu,
.ap-lang-switch.is-open .ap-lang-menu { display: block; }
.ap-lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  color: #f8fafc;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
}
.ap-lang-menu a em {
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: rgba(248,250,252,0.5);
}
.ap-lang-menu a:hover, .ap-lang-menu a.is-on {
  background: var(--px-accent-soft);
  color: var(--px-accent-mid);
}
.ap-lang .btn, .ap-lang .dash-head-link {
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,0.16) !important;
  background: rgba(15, 23, 42, 0.4) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  padding: 0.3rem 0.75rem !important;
  transition: background .2s ease, transform .2s var(--px-ease);
}
.ap-lang .btn:hover, .ap-lang .dash-head-link:hover {
  background: rgba(15, 23, 42, 0.62) !important;
  transform: translateY(-1px);
}
.ap-lang .dropdown-menu {
  background: #0f172a !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 12px !important;
}
.ap-lang .dropdown-item { color: #f8fafc !important; }
.ap-lang .dropdown-item:hover, .ap-lang .dropdown-item.text-primary {
  background: var(--px-accent-soft) !important;
  color: var(--px-accent-mid) !important;
}

.ap-bing {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(9rem, auto);
  align-items: end;
  gap: 0.85rem 1.25rem;
  padding-right: 0.25rem;
  animation: apFadeUp .7s .2s var(--px-ease) both;
}
.ap-bing__left { min-width: 0; }
.ap-bing__info strong {
  display: block;
  font-family: var(--px-display);
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  transition: opacity .45s ease;
}
.ap-bing__info.is-swap strong, .ap-bing__info.is-swap span, .ap-bing__info.is-swap p {
  animation: apFadeUp .45s var(--px-ease) both;
}
.ap-bing__info span { display: block; font-size: 0.78rem; color: rgba(248,250,252,0.7); font-weight: 500; }
.ap-quote {
  margin: 0.55rem 0 0;
  max-width: 34rem;
  padding: 0.7rem 0.9rem 0.8rem;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(12, 175, 96, 0.22), rgba(15, 23, 42, 0.55));
  border: 1px solid rgba(12, 175, 96, 0.45);
  box-shadow: 0 0 0 1px rgba(12, 175, 96, 0.12), 0 14px 36px -18px rgba(0,0,0,.55);
  backdrop-filter: blur(16px);
}
.ap-quote figcaption {
  margin: 0 0 0.28rem;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--px-accent-mid);
  font-weight: 800;
}
.ap-quote blockquote {
  margin: 0;
  font-family: var(--px-display);
  font-size: clamp(0.92rem, 0.8rem + 0.5vw, 1.12rem);
  line-height: 1.4;
  color: #fff;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.ap-quote cite {
  display: block;
  margin-top: 0.35rem;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--px-accent-mid);
  font-weight: 700;
}
.ap-quote-line {
  margin: 0.4rem 0 0;
  max-width: 36rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: rgba(248,250,252,0.78);
  font-weight: 500;
}
.ap-quote-line cite { color: var(--px-accent-mid); font-style: normal; font-weight: 700; }
.ap-history {
  display: flex; gap: 0.35rem; overflow: auto hidden;
  scrollbar-width: none;
  justify-content: flex-end;
}
.ap-history::-webkit-scrollbar { display: none; }
.ap-history__item {
  flex: 0 0 auto;
  width: 72px; height: 44px;
  padding: 0; border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px; overflow: hidden; background: #0f172a; cursor: pointer;
  opacity: 0.7;
  transition: opacity .25s ease, transform .25s var(--px-ease), border-color .25s ease, box-shadow .25s ease;
}
.ap-history__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-history__item:hover {
  opacity: 1;
  transform: translateY(-3px) scale(1.06);
  border-color: var(--px-accent-mid);
}
.ap-history__item.is-on {
  opacity: 1;
  border-color: var(--px-accent);
  box-shadow: 0 0 0 2px var(--px-accent-glow);
}
.ap-bing__copy {
  font-size: 0.72rem;
  color: rgba(248,250,252,0.62);
  font-weight: 600;
  text-align: right;
  padding-right: 0.15rem;
  max-width: 14rem;
  justify-self: end;
}
.ap-bing__copy small { display: block; margin-bottom: 0.2rem; color: rgba(248,250,252,0.72); }
.ap-bing__copy strong { color: var(--px-accent-mid); font-variant-numeric: tabular-nums; }
.ap-captcha-note {
  margin: 0.15rem 0 0.55rem;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--px-muted);
  font-weight: 500;
}
.ap-captcha-note a { font-weight: 700; }

body.ap-auth .grecaptcha-badge {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.ap-hourbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  height: 3px;
  background: rgba(255,255,255,.12);
  pointer-events: none;
}
.ap-hourbar > i {
  display: block;
  height: 100%;
  width: calc(var(--p, 0) * 100%);
  background: linear-gradient(90deg, var(--px-accent-deep), var(--px-accent-mid));
  box-shadow: 0 0 12px var(--px-accent-glow);
  transition: width .8s linear;
}

.ap-toast {
  position: absolute;
  left: 50%;
  bottom: 1.65rem;
  z-index: 4;
  transform: translate(-50%, 10px);
  opacity: 0;
  pointer-events: none;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(14px);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
  max-width: min(90vw, 28rem);
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity .35s var(--px-ease), transform .35s var(--px-ease);
}
.ap-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 767.98px) {
  .ap-stage { padding: 0.75rem 0.85rem 1rem; }
  .ap-brand em { display: none; }
  .ap-brand img { width: 58px; height: 58px; }
  .ap-hud { width: 100%; }
  .ap-stage-mid { max-width: 100%; }
  .ap-bing { grid-template-columns: 1fr; }
  .ap-history { justify-content: flex-start; }
  .ap-bing__copy { text-align: left; justify-self: start; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ap-bg__slide, .ap-hud, .ap-top, .ap-bing, .ap-wx, .ap-hello, .ap-sub, .ap-brief, .ap-quote,
  .ap-orbs i, .ap-grain, .ap-wx i, .ap-flipclock__colon i,
  .ap-flip__flap--top, .ap-flip__flap--bot {
    animation: none !important;
  }
  .ap-bg__slide { transform: none; }
  .ap-hud.is-live { transform: none !important; }
  .ap-grain { animation: none; }
}
