:root {
  --bg-base: #eef4ff;
  --bg-top: #f9fbff;
  --bg-accent: #deebff;
  --ink: #15233e;
  --ink-soft: #5d6e8f;
  --brand: #1763ff;
  --brand-strong: #0f4fcc;
  --teal: #119a8f;
  --warm: #ffbe68;
  --card: rgba(255, 255, 255, 0.9);
  --line: rgba(21, 35, 62, 0.14);
  --danger: #c43e3e;
  --ok: #0b8b5b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, rgba(23, 99, 255, 0.12), transparent 40%),
    radial-gradient(circle at 88% 15%, rgba(17, 154, 143, 0.12), transparent 32%),
    linear-gradient(145deg, var(--bg-top), var(--bg-base));
}

.login-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  min-height: 100vh;
  isolation: isolate;
  overflow: hidden;
}

.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  z-index: -1;
}

.login-shell::before {
  width: 420px;
  height: 420px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle at 40% 40%, rgba(23, 99, 255, 0.2), rgba(23, 99, 255, 0));
  animation: floatOrbit 12s ease-in-out infinite;
}

.login-shell::after {
  width: 360px;
  height: 360px;
  left: -130px;
  bottom: -160px;
  background: radial-gradient(circle at 30% 35%, rgba(255, 190, 104, 0.26), rgba(255, 190, 104, 0));
  animation: floatOrbit 14s ease-in-out infinite reverse;
}

.brand-panel {
  padding: clamp(40px, 7vw, 86px);
  background:
    linear-gradient(170deg, #133572, #0f2142 58%, #092033),
    linear-gradient(0deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
  color: #f2f7ff;
  display: grid;
  align-items: center;
}

.brand-wrap {
  max-width: 560px;
  animation: panelRise 0.7s ease-out;
}

.badge {
  width: fit-content;
  margin: 0 0 20px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.brand-wrap h1 {
  margin: 0;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
}

.brand-text {
  margin: 20px 0 26px;
  max-width: 46ch;
  line-height: 1.8;
  color: rgba(242, 247, 255, 0.88);
}

.brand-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.brand-points li {
  position: relative;
  padding-left: 24px;
  color: rgba(242, 247, 255, 0.92);
}

.brand-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--warm), #ffdba8);
  box-shadow: 0 0 0 4px rgba(255, 190, 104, 0.22);
}

.form-panel {
  padding: clamp(26px, 5vw, 56px);
  display: grid;
  align-content: center;
  justify-items: center;
}

.login-card {
  width: min(460px, 100%);
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow:
    0 28px 64px rgba(17, 38, 78, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  animation: panelRise 0.7s ease-out;
}

.card-head {
  margin-bottom: 20px;
}

.card-eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
}

.card-head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
}

.card-head p {
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.login-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.92rem;
  font-weight: 600;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  outline: none;
  border-color: rgba(23, 99, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(23, 99, 255, 0.13);
}

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.toggle-password {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  font-weight: 700;
  color: var(--brand-strong);
  background: rgba(23, 99, 255, 0.08);
  cursor: pointer;
}

.form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.remember {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.remember input {
  accent-color: var(--brand);
}

.meta-link {
  color: var(--brand-strong);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.meta-link:hover {
  text-decoration: underline;
}

.submit-btn {
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, var(--brand), #2c79ff 55%, #3c8fff);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(23, 99, 255, 0.22);
}

.submit-btn:disabled {
  cursor: wait;
  opacity: 0.78;
}

.form-message {
  min-height: 1.25em;
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: var(--ok);
}

.split-line {
  margin: 18px 0;
  position: relative;
  text-align: center;
}

.split-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--line);
}

.split-line span {
  position: relative;
  padding: 0 10px;
  font-size: 0.84rem;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.95);
}

.card-actions {
  display: grid;
  gap: 14px;
}

.ghost-btn {
  border: 1px solid rgba(17, 154, 143, 0.36);
  border-radius: 12px;
  padding: 12px 14px;
  color: #0f645d;
  background: rgba(17, 154, 143, 0.1);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.copyright {
  margin: 14px 0 0;
  color: #6b7b9d;
  font-size: 0.8rem;
  text-align: center;
}

@keyframes panelRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatOrbit {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(14px, -12px);
  }
  100% {
    transform: translate(0, 0);
  }
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .brand-panel {
    min-height: 300px;
    padding: 38px 24px;
  }

  .brand-wrap {
    max-width: 680px;
  }

  .form-panel {
    padding: 22px 16px 32px;
  }
}

@media (max-width: 640px) {
  .login-shell {
    min-height: 100vh;
  }

  .brand-panel {
    display: none;
  }

  .form-panel {
    min-height: 100vh;
    align-content: center;
    padding: 18px 12px 22px;
  }

  .login-card {
    width: 100%;
    border-radius: 18px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.96);
  }

  .card-head {
    margin-bottom: 16px;
  }

  .field input,
  .submit-btn,
  .ghost-btn,
  .toggle-password {
    min-height: 44px;
  }

  .password-row {
    grid-template-columns: 1fr;
  }

  .toggle-password {
    min-height: 42px;
  }

  .form-meta {
    flex-wrap: wrap;
    gap: 8px;
  }

  .copyright {
    margin-top: 12px;
    font-size: 0.76rem;
  }
}

@media (max-width: 420px) {
  .form-panel {
    padding: 12px 10px 18px;
  }

  .login-card {
    border-radius: 16px;
    padding: 16px;
  }

  .card-head p {
    font-size: 0.9rem;
  }

  .remember,
  .meta-link {
    font-size: 0.84rem;
  }
}
