/* =========================================================================
   Login page
   ========================================================================= */
body.login_body { overflow-y: auto; }

.login_page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg);
}

.login_brand { display: none; }

.login_panel {
  padding: 32px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  animation: animated_fade_in .3s ease-out;
}

.logo {
  height: 40px;
  margin-bottom: 8px;
  object-fit: contain;
  object-position: left center;
}

.login_title { margin: 0; font-family: var(--font-display); color: var(--text); font-size: 24px; font-weight: 700; line-height: 1.3; }

.login_subtitle { margin: -10px 0 8px 0; color: var(--muted); font-size: 14.5px; }

.login_field { position: relative; display: flex; flex-direction: column; gap: 6px; }

.login_field > label { color: var(--text-2); font-size: 13px; font-weight: 600; }

.login_field > .icon {
  position: absolute;
  left: 13px;
  bottom: 12px;
  color: var(--muted);
  font-size: 20px;
  pointer-events: none;
}

.text_input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  color: var(--text);
  font-size: 15px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.text_input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }

.login_field:focus-within > .icon { color: var(--primary); }

.login_field > .password_toggle { height: 46px; }

.operator {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.toggle_container { display: flex; align-items: center; gap: 10px; }

.toggle_switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; display: block; }

.toggle_switch input[type='checkbox'] { opacity: 0; width: 0; height: 0; }

.toggle_slider {
  position: absolute;
  inset: 0;
  background-color: var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .15s;
}

.toggle_slider:before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background-color: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  transition: transform .15s ease-out;
}

input[type='checkbox']:checked + .toggle_slider { background-color: var(--primary); }

input[type='checkbox']:checked + .toggle_slider:before { transform: translateX(18px); }

input[type='checkbox']:focus-visible + .toggle_slider { box-shadow: 0 0 0 3px var(--primary-ring); }

.toggle_label { color: var(--text-2); font-size: 14px; }

.sign {
  width: 100%;
  height: 46px;
  color: #fff;
  font-size: 15.5px;
  font-weight: 600;
  background: var(--grad);
  border: none;
  border-radius: 12px;
  box-shadow: 0 12px 24px -12px rgba(99, 102, 241, .95);
  cursor: pointer;
  transition: background-color .15s, transform .1s;
}

.sign:hover { filter: brightness(1.07); }

.sign:active { transform: translateY(1px); }

.login_footer { margin-top: 6px; color: var(--muted); font-size: 12.5px; text-align: center; }

@media screen and (min-width: 992px) {
  .login_page { grid-template-columns: minmax(0, 1.1fr) minmax(460px, 1fr); }
  .login_brand {
    position: relative;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background:
      radial-gradient(1000px 500px at 110% 110%, rgba(167, 139, 250, .45), transparent 60%),
      radial-gradient(800px 600px at -10% -10%, rgba(99, 102, 241, .55), transparent 60%),
      linear-gradient(140deg, #14174a 0%, #3730a3 50%, #7c3aed 100%);
    overflow: hidden;
  }
  .login_brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
    pointer-events: none;
  }
  .login_brand_badge {
    align-self: flex-start;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
  }
  .login_brand_title { margin: 0; font-family: var(--font-display); max-width: 520px; font-size: 40px; font-weight: 700; line-height: 1.25; }
  .login_brand_text { margin: 14px 0 0 0; max-width: 480px; color: rgba(255, 255, 255, .8); font-size: 16px; line-height: 1.7; }
  .login_feature { margin: 0; padding: 0; display: grid; gap: 14px; list-style: none; }
  .login_feature > li { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .92); font-size: 15px; }
  .login_feature .icon {
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    background: rgba(255, 255, 255, .14);
    border-radius: 10px;
  }
  .container { padding: 44px 40px 36px 40px; }
}
