.signin-page {
  --accent-brand: #8B5CF6;
  --accent-brand-hover: #A78BFA;
  background: #0a0e17;
}

.signin-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: #0a0e17;
  background-image: url('/common/public/image/signin-background.webp'), radial-gradient(ellipse 80% 80% at 100% 0%, rgba(56, 189, 248, 0.25) 0%, rgba(0, 71, 255, 0.08) 50%, transparent 100%);
  background-size: cover, auto;
  background-position: center, top right;
  background-repeat: no-repeat, no-repeat;
}

.signin-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 0;
}

.signin-bg-overlay {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
  mix-blend-mode: overlay;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .signin-bg-overlay {
    display: block;
  }
}

.signin-form-zone {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.signin-form-card {
  position: relative;
  border-radius: 1rem;
  padding: 2rem;
  background: linear-gradient(160deg, rgba(15, 15, 25, 0.75) 0%, rgba(10, 14, 23, 0.85) 50%, rgba(8, 10, 20, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(40px) saturate(0.9);
  -webkit-backdrop-filter: blur(40px) saturate(0.9);
  transform: translateZ(0);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.5);
}

.signin-input::-webkit-autofill,
.signin-input::-webkit-autofill:hover,
.signin-input::-webkit-autofill:focus {
  -webkit-text-fill-color: #f0f0f0;
  -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.05) inset;
}

.signin-support-link:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-brand);
}

/* ========== MOBILE ========== */

@media (max-width: 768px) {
  .signin-page {
    height: calc(var(--vh, 1vh) * 100);
    min-height: 0;
    overflow: hidden;
    background: #0b0f1a;
  }

  .signin-bg {
    background-color: #0b0f1a;
    background-image: url('/common/img/mobile-bg-color.webp');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
  }

  .signin-bg::after {
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.25) 0%,
      rgba(0, 0, 0, 0.4) 35%,
      rgba(0, 0, 0, 0.7) 65%,
      rgba(11, 15, 26, 0.92) 100%
    );
  }

  .signin-form-zone {
    justify-content: flex-start;
    padding: 0 24px;
    padding-top: max(env(safe-area-inset-top, 0px), 16px);
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 16px);
    height: calc(var(--vh, 1vh) * 100);
    overflow: hidden;
  }

  .signin-form-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 100%;
    padding: 0;
    background: none;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    border-radius: 0;
  }

  .signin-header {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 0 !important;
    min-height: 0;
  }

  .signin-header h1 {
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  }

  .signin-header p {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.55);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
  }

  .signin-label {
    display: none;
  }

  #signinForm {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  #signinForm > * {
    margin: 0 !important;
  }

  .signin-input {
    background: rgba(255, 255, 255, 0.07) !important;
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 14px !important;
    padding: 15px 20px !important;
    font-size: 16px !important;
    color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .signin-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-size: 15px;
  }

  .signin-input:focus {
    border-color: var(--accent-brand) !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18),
                inset 0 0 0 1px rgba(139, 92, 246, 0.1) !important;
    background: rgba(255, 255, 255, 0.1) !important;
  }

  .signin-input::-webkit-autofill,
  .signin-input::-webkit-autofill:hover,
  .signin-input::-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.07) inset;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
  }

  .signin-btn {
    background: linear-gradient(135deg, var(--accent-brand) 0%, #6366f1 50%, #4f46e5 100%) !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 15px 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3),
                0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  }

  .signin-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
  }

  .signin-form-card > .mt-8 {
    flex: 0 0 auto;
    margin-top: 16px !important;
    padding-bottom: 8px;
  }

  .signin-support-link {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 0.8125rem !important;
  }

  .signin-support-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
  }
}

