:root {
  --auth-text: #ffffff;
  --auth-muted: #9ca3af;
  --auth-info-bg: rgba(25, 35, 70, 0.92);
  --auth-card-fill: rgba(20, 20, 25, 0.72);
  --auth-radius: 40px;
  --auth-btn-start: #6366f1;
  --auth-btn-end: #d946ef;
}

@font-face {
  font-family: OpenSans;
  src: url("../fonts/OpenSans-Regular.woff2") format("woff2"),
       url("../fonts/OpenSans-Regular.woff") format("woff");
  font-display: swap;
}

* { box-sizing: border-box; }

body.page-auth {
  min-height: 100vh;
  min-width: 0;
  margin: 0;
  font-family: OpenSans, system-ui, -apple-system, sans-serif;
  color: var(--auth-text);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-x: hidden;
}

.page-auth .bg-blur {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #000 url("../img/header.jpg") center top no-repeat;
  background-size: cover;
  filter: blur(22px);
  transform: scale(1.08);
  transform-origin: center top;
  pointer-events: none;
}

.page-auth .page {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
}

.page-auth .card-shell {
  padding: 1px;
  border-radius: var(--auth-radius);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.06) 35%,
    rgba(255, 255, 255, 0.03) 55%,
    rgba(255, 255, 255, 0.08) 100%
  );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 32px 80px rgba(0, 0, 0, 0.45);
}

.page-auth .card {
  border-radius: calc(var(--auth-radius) - 1px);
  padding: 44px 36px 32px;
  text-align: center;
  background: var(--auth-card-fill);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

.page-auth .card-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.page-auth .ms-logo {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  line-height: 0;
}

.page-auth .ms-logo__mark svg,
.page-auth .ms-logo__wordmark svg {
  display: block;
  overflow: visible;
}

.page-auth .ms-logo--auth {
  justify-content: center;
}

.page-auth .ms-logo--auth .ms-logo__mark svg {
  width: 39px;
  height: 46px;
}

.page-auth .ms-logo--auth .ms-logo__wordmark svg {
  height: 24px;
  width: auto;
}

.page-auth .ms-logo__dash {
  animation: ms-dash 1.8s linear infinite;
}

.page-auth .ms-logo__dash--delay {
  animation-delay: 0.9s;
}

.page-auth .ms-logo__ripple {
  animation: ms-ripple 4s ease-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.page-auth .ms-logo__ripple--2 {
  animation-delay: 1.33s;
}

.page-auth .ms-logo__ripple--3 {
  animation-delay: 2.66s;
}

.page-auth .ms-logo__glow {
  animation: ms-glow 3.5s ease-in-out infinite;
}

@keyframes ms-dash {
  from { stroke-dashoffset: 20; }
  to   { stroke-dashoffset: 0; }
}

@keyframes ms-ripple {
  0%   { r: 2; opacity: 0.65; }
  100% { r: 19; opacity: 0; }
}

@keyframes ms-glow {
  0%, 100% { opacity: 0.22; }
  50%      { opacity: 0.60; }
}

.page-auth .lead {
  font-size: 14px;
  color: var(--auth-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.page-auth .auth-form {
  text-align: left;
}

.page-auth .field {
  margin-bottom: 16px;
}

.page-auth .field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--auth-text);
  margin-bottom: 10px;
}

.page-auth .input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.page-auth .input-row:focus-within {
  border-color: rgba(129, 140, 248, 0.75);
  box-shadow:
    inset 0 0 0 1px rgba(129, 140, 248, 0.35),
    0 0 0 3px rgba(99, 102, 241, 0.18);
}

.page-auth .input-row input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--auth-text);
  font-size: 16px;
  font-family: inherit;
}

.page-auth .input-row input::placeholder {
  color: rgba(156, 163, 175, 0.85);
}

.page-auth .toggle-pass {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--auth-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.page-auth .toggle-pass svg {
  width: 18px;
  height: 18px;
}

.page-auth .toggle-pass:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.page-auth #mess {
  display: none;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(127, 29, 29, 0.55);
  border: 1px solid rgba(248, 113, 113, 0.35);
  font-size: 13px;
  line-height: 1.45;
  color: #fecaca;
  text-align: center;
}

.page-auth .link-remind {
  display: inline-block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--auth-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.page-auth .link-remind:hover {
  color: #fff;
}

.page-auth .terms-row {
  display: none;
}

.page-auth .terms-text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--auth-muted);
  text-align: left;
  padding-top: 4px;
}

.page-auth .terms-text a {
  color: var(--auth-text);
  font-weight: 600;
  text-decoration: none;
}

.page-auth .terms-text a:hover {
  text-decoration: underline;
}

.page-auth .switch {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}

.page-auth .switch.is-on {
  background: linear-gradient(to right, var(--auth-btn-start), var(--auth-btn-end));
  border-color: transparent;
}

.page-auth .switch .c {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  margin: 3px 0 0 3px;
  transition: margin 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.page-auth .switch.is-on .c {
  margin-left: 23px;
}

.page-auth .input-row--captcha {
  padding-right: 8px;
  gap: 10px;
}

.page-auth .captcha-img {
  height: 40px;
  width: auto;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.page-auth .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 22px;
  padding: 16px 24px;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(to right, var(--auth-btn-start), var(--auth-btn-end));
  box-shadow:
    0 6px 28px rgba(99, 102, 241, 0.45),
    0 4px 16px rgba(217, 70, 239, 0.2);
  transition: transform 0.2s, filter 0.2s, box-shadow 0.2s;
  position: relative;
}

.page-auth .btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.page-auth .btn .load {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.page-auth .account {
  margin-top: 28px;
  font-size: 14px;
  color: var(--auth-muted);
}

.page-auth .account a {
  color: var(--auth-text);
  font-weight: 700;
  text-decoration: none;
}

.page-auth .account a:hover {
  text-decoration: underline;
}

.page-auth .divider {
  margin: 28px 0 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.page-auth .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}

.page-auth .card-footer a {
  color: var(--auth-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.page-auth .card-footer a:hover {
  color: #fff;
}

.page-auth--cart .page {
  width: min(100%, 880px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 24px;
  align-items: start;
}

.page-auth .auth-cart {
  border-radius: var(--auth-radius);
  padding: 28px 24px 24px;
  text-align: left;
  background: var(--auth-card-fill);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 32px 80px rgba(0, 0, 0, 0.45);
}

.page-auth .auth-cart-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.page-auth .auth-cart-head svg {
  width: 20px;
  height: 20px;
}

.page-auth .auth-cart-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-auth .auth-cart-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.page-auth .auth-cart-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.page-auth .auth-cart-tarif {
  margin-top: 6px;
  font-size: 13px;
  color: var(--auth-muted);
}

.page-auth .auth-cart-rows {
  margin-top: 16px;
}

.page-auth .auth-cart-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  margin-top: 10px;
  color: var(--auth-muted);
}

.page-auth .auth-cart-row span:last-child {
  color: #fff;
  font-weight: 700;
}

.page-auth .auth-cart-row--prepay span:last-child {
  background: linear-gradient(to right, var(--auth-btn-start), var(--auth-btn-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-auth .auth-cart-note {
  margin: 20px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--auth-muted);
}

@media (max-width: 800px) {
  .page-auth--cart .page {
    width: min(100%, 420px);
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .page-auth .card {
    padding: 36px 24px 28px;
  }
  .page-auth {
    --auth-radius: 28px;
  }
}
