/****************************************************
  LOGIN PAGE - PART 1
  Layout + Wrapper + Header + Tabs
****************************************************/

.login-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;

  padding: 2rem;

  background:
    radial-gradient(
      circle at top right,
      rgba(51, 103, 232, 0.08),
      transparent 28%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(51, 103, 232, 0.05),
      transparent 35%
    ),
    var(--color-bg);
}

.login-wrapper {
  width: 100%;
  max-width: 1050px;
  min-height: 620px;

  display: flex;

  overflow: hidden;

  background: var(--color-surface);

  border-radius: 24px;

  border: 1px solid var(--color-border);

  box-shadow:
    0 20px 45px rgba(15, 23, 42, 0.08),
    0 4px 12px rgba(15, 23, 42, 0.05);

  animation: loginWrapperShow 0.45s ease;
}

@keyframes loginWrapperShow {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-left-side {
  width: 48%;

  position: relative;

  overflow: hidden;

  display: flex;
  justify-content: center;
  align-items: center;

  background: linear-gradient(135deg, #3367e8, #4d82ff);

  color: white;
}
.login-left-side::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  top: 0;
  right: 50%;
}

/* .login-left-side::after {
  content: "";

  position: absolute;

  width: 340px;
  height: 340px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.05);

  bottom: -120px;
  left: -100px;
} */

.login-left-content {
  position: relative;

  z-index: 2;

  text-align: center;

  width: 100%;

  padding: 50px;
}

.login-left-image {
  width: 100%;
  max-width: 390px;

  height: auto;

  object-fit: contain;

  margin: auto;

  display: block;

  transition: 0.45s;
}

.login-left-image:hover {
  transform: translateY(-8px);
}

.left-icons {
  display: flex;

  justify-content: center;

  gap: 18px;

  margin-top: 40px;
}

.left-icons svg {
  width: 32px;
  height: 32px;
  padding: 8px;

  border-radius: 12px;

  background: rgba(255, 255, 255, 0.12);

  backdrop-filter: blur(10px);

  color: white;

  transition: 0.25s;
}

.left-icons svg:hover {
  transform: translateY(-5px);

  background: rgba(255, 255, 255, 0.2);
}

.login-right-side {
  flex: 1;

  display: flex;

  flex-direction: column;

  justify-content: center;

  padding: 60px;
}

.login-logo {
  width: 74px;

  margin: auto;

  margin-bottom: 28px;
}

.login-logo img {
  width: 100%;
}

.login-header {
  text-align: center;

  margin-bottom: 34px;
}

.login-title {
  margin: 0;

  color: var(--color-text);

  font-size: 34px;

  font-weight: 700;

  letter-spacing: -0.02em;
}

.login-subtitle {
  margin-top: 10px;

  color: var(--color-text-secondary);

  font-size: 15px;

  line-height: 1.6;
}

.login-header {
  text-align: center;

  margin-bottom: 34px;
}

.login-title {
  margin: 0;

  color: var(--color-text);

  font-size: 34px;

  font-weight: 700;

  letter-spacing: -0.02em;
}

.login-subtitle {
  margin-top: 10px;

  color: var(--color-text-secondary);

  font-size: 15px;

  line-height: 1.6;
}

.login-tabs {
  display: flex;

  gap: 6px;

  padding: 5px;

  margin-bottom: 32px;

  border-radius: 14px;

  background: var(--color-bg);

  border: 1px solid var(--color-border);
}

.login-tab {
  flex: 1;

  border: none;

  background: transparent;

  color: var(--color-text-secondary);

  border-radius: 10px;

  padding: 12px;

  cursor: pointer;

  font-size: 14px;

  font-weight: 600;

  transition: 0.25s;
}

.login-tab:hover {
  color: var(--color-text);

  background: var(--color-surface);
}

.login-tab.active {
  background: var(--color-primary);

  color: white;

  box-shadow: 0 8px 20px rgba(51, 103, 232, 0.28);
}

.login-form-group {
  position: relative;

  margin-bottom: 24px;
}

.login-form-group label {
  display: block;

  margin-bottom: 10px;

  color: var(--color-text);

  font-size: 14px;

  font-weight: 600;

  letter-spacing: 0.01em;
}

.login-input-wrapper {
  position: relative;

  display: flex;

  align-items: center;
}

.login-input-icon {
  position: absolute;

  left: 16px;

  width: 20px;

  height: 20px;

  display: flex;

  align-items: center;

  justify-content: center;

  color: var(--color-text-secondary);

  pointer-events: none;

  transition: 0.25s;
}

.login-input-icon svg {
  width: 20px;
  height: 20px;
}

.login-password-show {
  position: absolute;

  right: 16px;

  width: 20px;
  height: 20px;

  cursor: pointer;

  fill: var(--color-text-secondary);

  transition: 0.25s;
}

.login-password-show:hover {
  fill: var(--color-primary);
}

.login-form-group input {
  width: 100%;

  height: 52px;

  padding: 0 16px 0 48px;

  border-radius: 14px;

  border: 1px solid var(--color-border);

  background: var(--color-surface);

  color: var(--color-text);

  font-size: 15px;

  transition: 0.25s;

  outline: none;

  box-shadow: none;

  -webkit-box-shadow: none !important;

  -webkit-text-fill-color: var(--color-text);
}

.login-form-group input::placeholder {
  color: var(--color-text-muted);
}

.login-form-group input:hover {
  border-color: var(--color-primary-border);
}

.login-form-group input:hover {
  border-color: var(--color-primary-border);
}

.login-form-group input:focus {
  border-color: var(--color-primary);

  box-shadow: 0 0 0 4px rgba(51, 103, 232, 0.1);

  background: white;
}

.login-input-wrapper:focus-within .login-input-icon {
  color: var(--color-primary);

  transform: scale(1.05);
}

.login-input-wrapper:focus-within .login-password-show {
  fill: var(--color-primary);
}

.login-required {
  margin-top: 8px;

  color: var(--color-danger);

  font-size: 12px;

  font-weight: 500;

  position: relative;

  width: auto;

  text-align: left;
}

.login-button {
  width: 100%;

  height: 52px;

  border: none;

  border-radius: 14px;

  cursor: pointer;

  background: var(--color-primary);

  color: white;

  font-size: 15px;

  font-weight: 600;

  letter-spacing: 0.02em;

  transition: 0.25s;

  margin-top: 10px;

  overflow: hidden;

  position: relative;
}

.login-button:hover {
  background: var(--color-primary-hover);

  transform: translateY(-2px);

  box-shadow: 0 12px 24px rgba(51, 103, 232, 0.22);
}

.login-button:active {
  transform: translateY(0);
}

.login-button:disabled {
  cursor: not-allowed;

  background: var(--color-disabled-bg);

  color: var(--color-disabled-text);

  box-shadow: none;
}

.login-button::after {
  content: "";

  position: absolute;

  top: 0;

  left: -100%;

  width: 60%;

  height: 100%;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );

  transform: skewX(-20deg);

  transition: 0.6s;
}

.login-button:hover::after {
  left: 160%;
}

.login-loader {
  pointer-events: none;
}

.login-loader::before {
  content: "";

  position: absolute;

  left: 0;

  bottom: 0;

  height: 3px;

  width: 40%;

  border-radius: 999px;

  background: white;

  animation: loginLoading 1.2s infinite linear;
}

@keyframes loginLoading {
  from {
    transform: translateX(-120%);
  }

  to {
    transform: translateX(350%);
  }
}

.login-request {
  border: none;

  background: none;

  padding: 0;

  margin-top: 8px;

  color: var(--color-primary);

  font-size: 13px;

  font-weight: 600;

  cursor: pointer;

  transition: 0.2s;
}

.login-request:hover {
  color: var(--color-primary-hover);
}

.otp-text {
  margin: 10px 0 14px;

  color: var(--color-text-secondary);

  font-size: 14px;

  line-height: 1.6;
}

.login-input-otp {
  display: flex;

  gap: 12px;

  justify-content: center;

  margin-top: 10px;
}

.login-input-otp input {
  height: 58px;

  border-radius: 14px;

  border: 1px solid var(--color-border);

  background: var(--color-surface);

  text-align: center;

  font-size: 22px;

  font-weight: 700;

  transition: 0.25s;
}

.login-input-otp input:focus {
  border-color: var(--color-primary);

  box-shadow: 0 0 0 4px rgba(51, 103, 232, 0.1);
}

.login-version {
  margin-top: 26px;

  text-align: center;

  color: var(--color-text-muted);

  font-size: 12px;
}

.login-bottom-to-top-animation {
  animation: loginFadeUp 0.35s ease;
}

@keyframes loginFadeUp {
  from {
    opacity: 0;

    transform: translateY(18px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

.login-logo-sm {
  display: none;
  width: 72px;
  margin: 0 auto 30px;
}

.login-logo-sm img {
  width: 100%;
}

.login-left-image {
  animation: loginFloating 5s ease-in-out infinite;
}

@keyframes loginFloating {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0);
  }
}

.login-wrapper {
  transition: 0.35s;
}

.login-wrapper:hover {
  box-shadow:
    0 30px 70px rgba(15, 23, 42, 0.12),
    0 10px 24px rgba(15, 23, 42, 0.08);
}

.login-form-group input:-webkit-autofill,
.login-form-group input:-webkit-autofill:hover,
.login-form-group input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--color-text);

  transition: background-color 9999s;

  box-shadow: 0 0 0 100px var(--color-surface) inset;
}

::selection {
  background: var(--color-primary);

  color: white;
}

.login-button,
.login-tab,
.login-form-group input,
.login-password-show,
.left-icons svg {
  transition:
    background 0.25s,
    border-color 0.25s,
    color 0.25s,
    transform 0.25s,
    box-shadow 0.25s;
}

.login-button:focus-visible,
.login-tab:focus-visible,
.login-request:focus-visible {
  outline: none;

  box-shadow: 0 0 0 4px rgba(51, 103, 232, 0.18);
}

.login-divider {
  position: relative;

  margin: 26px 0;

  text-align: center;

  color: var(--color-text-muted);

  font-size: 13px;
}

.login-divider::before {
  content: "";

  position: absolute;

  left: 0;

  top: 50%;

  width: 100%;

  height: 1px;

  background: var(--color-divider);
}

.login-divider span {
  position: relative;

  background: var(--color-surface);

  padding: 0 14px;
}

@media (max-width: 1200px) {
  .login-wrapper {
    max-width: 950px;
  }

  .login-right-side {
    padding: 48px;
  }
}

@media (max-width: 992px) {
  .login-wrapper {
    max-width: 850px;
  }

  .login-left-side {
    width: 42%;
  }

  .login-right-side {
    padding: 42px;
  }

  .login-title {
    font-size: 30px;
  }
}

@media (max-width: 820px) {
  .login-container {
    padding: 24px;
  }

  .login-wrapper {
    flex-direction: column;

    min-height: auto;

    border-radius: 22px;
  }

  .login-left-side {
    display: none;
  }

  .login-logo {
    display: none;
  }

  .login-logo-sm {
    display: block;
  }

  .login-right-side {
    padding: 36px;
  }

  .login-title {
    font-size: 28px;
  }

  .login-subtitle {
    font-size: 14px;
  }

  .login-header {
    margin-bottom: 28px;
  }

  .desktop-title {
    display: none;
  }

  .mobile-title {
    display: inline;
  }
}

@media (max-width: 480px) {
  .login-container {
    padding: 0;
  }

  .login-wrapper {
    border: none;

    border-radius: 0;

    min-height: 100vh;

    box-shadow: none;
  }

  .login-right-side {
    padding: 30px 22px;
  }

  .login-title {
    font-size: 26px;
  }

  .login-form-group {
    margin-bottom: 22px;
  }

  .login-form-group input {
    height: 50px;
  }

  .login-button {
    height: 50px;
  }
}

@media (max-width: 500px) {
  .login-input-otp {
    gap: 8px;
  }

  .login-input-otp input {
    height: 48px;

    font-size: 20px;
  }
}

:root[data-theme="dark"] .login-wrapper {
  background: var(--color-surface);

  border-color: var(--color-border);

  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

:root[data-theme="dark"] .login-container {
  background:
    radial-gradient(
      circle at top right,
      rgba(79, 125, 245, 0.12),
      transparent 28%
    ),
    var(--color-bg);
}

:root[data-theme="dark"] .login-form-group input {
  background: #162033;
}

:root[data-theme="dark"] .login-form-group input:focus {
  background: #1c2840;
}

:root[data-theme="dark"] .login-tabs {
  background: #162033;
}

.login-left-content {
  width: 100%;
  max-width: 360px;
}

.login-left-title {
  margin: 0 0 36px;
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.login-feature-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-feature-item {
  display: flex;
  align-items: center;
  gap: 14px;

  color: rgba(255, 255, 255, 0.92);

  font-size: 15px;
  font-weight: 500;
}

.login-feature-item svg {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.95);
}

.login-tab-mobile {
  display: none;
}

@media (max-width: 820px) {
  .login-tab-desktop {
    display: none;
  }

  .login-tab-mobile {
    display: inline;
  }
}
