:root {
  --tcms-brand: #29b8ce;
  --tcms-brand-blue: #1b75bb;
  --tcms-navy: #0c2a44;
  --tcms-ink: #143a44;
  --tcms-muted: #607d86;
  --tcms-mist: #f1fafb;
}

html {
  min-width: 100%;
  min-height: 100%;
  background: var(--tcms-mist);
}

body.login {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  box-sizing: border-box;
  place-items: center;
  margin: 0;
  padding: clamp(24px, 4vw, 64px);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 18%, rgba(41, 184, 206, 0.2), transparent 29%),
    radial-gradient(circle at 86% 82%, rgba(27, 117, 187, 0.16), transparent 31%),
    linear-gradient(145deg, #e4f5f8 0%, #f7fbfc 46%, #edf6fa 100%);
  color: var(--tcms-ink);
  font-family: Manrope, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.login,
body.login * {
  box-sizing: border-box;
}

body.login::before,
body.login::after {
  position: fixed;
  z-index: 0;
  width: min(48vw, 720px);
  aspect-ratio: 1;
  border-radius: 46% 54% 60% 40% / 52% 44% 56% 48%;
  content: "";
  pointer-events: none;
}

body.login::before {
  top: -24%;
  right: -12%;
  background: radial-gradient(circle, rgba(41, 184, 206, 0.2), transparent 68%);
  filter: blur(24px);
  animation: tcms-login-float 14s ease-in-out infinite alternate;
}

body.login::after {
  bottom: -30%;
  left: -12%;
  background: radial-gradient(circle, rgba(27, 117, 187, 0.18), transparent 68%);
  filter: blur(30px);
  animation: tcms-login-float 17s ease-in-out infinite alternate-reverse;
}

.login #login {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(1180px, 100%);
  min-height: min(700px, calc(100svh - 64px));
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  align-content: center;
  column-gap: clamp(56px, 7vw, 112px);
  padding: clamp(48px, 5vw, 80px);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 36px 100px rgba(12, 42, 68, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.login #login::after {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 92px;
  height: 92px;
  border-top: 1px solid rgba(41, 184, 206, 0.24);
  border-right: 1px solid rgba(27, 117, 187, 0.2);
  border-radius: 0 20px 0 0;
  content: "";
  pointer-events: none;
}

.login #login > h1 {
  display: none;
}

.tcms-login-story {
  grid-column: 1;
  grid-row: 1 / span 4;
  align-self: center;
  max-width: 560px;
}

.tcms-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(30px, 4vh, 48px);
  color: var(--tcms-ink);
  text-decoration: none;
}

.tcms-brand-mark {
  width: 58px;
  height: 50px;
  flex: none;
  background: url("./brand-mark.png") center / contain no-repeat;
}

.tcms-brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.tcms-brand-copy strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.tcms-brand-copy strong span {
  color: var(--tcms-brand-blue);
}

.tcms-brand-copy small {
  margin-top: 7px;
  color: #78939b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.tcms-login-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px 8px 11px;
  border: 1px solid rgba(27, 117, 187, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 24px rgba(20, 58, 68, 0.08);
  color: #226b86;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tcms-login-badge::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #8ceaf7, var(--tcms-brand));
  box-shadow: 0 0 0 4px rgba(41, 184, 206, 0.12);
  content: "";
}

.tcms-login-story h1 {
  margin: 20px 0 16px;
  color: var(--tcms-ink);
  font-size: clamp(34px, 3vw, 48px);
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.tcms-login-story h1 span {
  background: linear-gradient(120deg, var(--tcms-brand), var(--tcms-brand-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tcms-login-story > p {
  max-width: 510px;
  margin: 0;
  color: #4c6b74;
  font-size: 16px;
  line-height: 1.65;
}

.tcms-login-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 22px 0 0;
  padding: 0;
  color: #345862;
  font-size: 13px;
  font-weight: 650;
  list-style: none;
}

.tcms-login-benefits li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tcms-login-benefits span {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 7px;
  background: rgba(41, 184, 206, 0.12);
  color: #168fa5;
  font-size: 12px;
  font-weight: 900;
}

.tcms-login-card-heading,
.login form,
.login #login_error,
.login .message,
.login .success {
  grid-column: 2;
}

.tcms-login-card-heading {
  position: relative;
  z-index: 2;
  padding: 32px 34px 12px;
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: 0 28px 70px rgba(12, 42, 68, 0.16);
}

.tcms-login-card-heading::before {
  position: absolute;
  top: 0;
  right: 34px;
  left: 34px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--tcms-brand), var(--tcms-brand-blue));
  content: "";
}

.tcms-login-card-heading span {
  color: var(--tcms-brand-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tcms-login-card-heading h2 {
  margin: 8px 0 7px;
  color: var(--tcms-ink);
  font-size: 26px;
  font-weight: 820;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.tcms-login-card-heading p {
  margin: 0;
  color: var(--tcms-muted);
  font-size: 13px;
  line-height: 1.55;
}

.login form {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 18px 34px 34px;
  border: 0;
  border-radius: 0 0 24px 24px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(12, 42, 68, 0.16);
}

.login form .input,
.login input[type="password"],
.login input[type="text"] {
  width: 100%;
  min-height: 52px;
  margin: 8px 0 20px;
  padding: 0 14px;
  border: 1px solid #bdd0d6;
  border-radius: 11px;
  background: #fbfdfd;
  box-shadow: inset 0 1px 2px rgba(12, 42, 68, 0.025);
  color: var(--tcms-ink);
  font-size: 17px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login label {
  color: var(--tcms-ink);
  font-size: 13px;
  font-weight: 700;
}

.login input:hover {
  border-color: #8eb7c2;
  background: #fff;
}

.login input:focus,
.login .button:focus-visible,
.login a:focus-visible {
  outline: 3px solid rgba(41, 184, 206, 0.48);
  outline-offset: 2px;
  border-color: var(--tcms-brand-blue);
  box-shadow: 0 0 0 4px rgba(41, 184, 206, 0.1);
}

.login .forgetmenot {
  display: flex;
  float: none;
  min-height: 44px;
  align-items: center;
  margin: 0 0 16px;
}

.login .forgetmenot label {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
}

.login .forgetmenot input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  border-color: #9ab8c0;
  border-radius: 6px;
}

.login .submit {
  margin: 0;
}

.wp-core-ui.login #wp-submit {
  float: none;
  width: 100%;
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--tcms-brand), var(--tcms-brand-blue));
  box-shadow: 0 12px 26px rgba(27, 117, 187, 0.24);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 50px;
  text-shadow: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.login .button-primary:hover,
.login .button-primary:focus {
  background: linear-gradient(135deg, #23abc0, #176aaa);
  box-shadow: 0 16px 32px rgba(27, 117, 187, 0.3);
  filter: saturate(1.06);
  transform: translateY(-1px);
}

.login .button-primary:active {
  transform: translateY(0) scale(0.985);
}

.login .button.wp-hide-pw {
  min-width: 48px;
  min-height: 48px;
  color: var(--tcms-brand-blue);
}

.login #login_error,
.login .message,
.login .success {
  margin: 12px 0 0;
  padding: 14px 18px;
  border-width: 0 0 0 4px;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(12, 42, 68, 0.09);
}

.login #nav,
.login #backtoblog {
  grid-column: 2;
  margin: 16px 0 0;
  padding: 0;
  text-align: center;
}

.login #backtoblog {
  margin-top: 8px;
}

.login #nav a,
.login #backtoblog a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 8px;
  border-radius: 8px;
  color: #4b6b74;
  font-size: 13px;
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.login #nav a:hover,
.login #backtoblog a:hover {
  color: var(--tcms-brand-blue);
}

.login .privacy-policy-page-link,
.login .language-switcher {
  display: none;
}

@keyframes tcms-login-float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(28px, 18px, 0) scale(1.08); }
}

@media (max-width: 980px) {
  body.login { padding: 24px; }

  .login #login {
    width: min(560px, 100%);
    min-height: auto;
    grid-template-columns: minmax(0, 1fr);
    padding: 32px 36px;
    border-radius: 28px;
  }

  .tcms-login-story,
  .tcms-login-card-heading,
  .login form,
  .login #login_error,
  .login .message,
  .login .success,
  .login #nav,
  .login #backtoblog {
    grid-column: 1;
    grid-row: auto;
  }

  .tcms-login-story {
    max-width: none;
    margin-bottom: 22px;
    text-align: center;
  }

  .tcms-brand-lockup,
  .tcms-login-badge,
  .tcms-login-benefits { justify-content: center; }
  .tcms-brand-lockup { margin-bottom: 20px; }

  .tcms-login-story h1 {
    margin: 14px 0 12px;
    font-size: clamp(28px, 5vw, 36px);
  }

  .tcms-login-story > p {
    margin-inline: auto;
    font-size: 15px;
  }

  .tcms-login-benefits { margin-top: 14px; }
}

@media (max-width: 560px) {
  body.login {
    display: block;
    padding: 0;
  }

  .login #login {
    width: 100%;
    min-height: 100svh;
    padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .login #login::after { display: none; }
  .tcms-login-story { margin-bottom: 14px; }
  .tcms-brand-lockup { margin-bottom: 10px; }

  .tcms-brand-mark {
    width: 40px;
    height: 35px;
  }

  .tcms-brand-copy strong { font-size: 17px; }
  .tcms-brand-copy small {
    margin-top: 5px;
    font-size: 9px;
  }

  .tcms-login-badge,
  .tcms-login-story > p,
  .tcms-login-benefits {
    display: none;
  }

  .tcms-login-story h1 {
    margin: 8px auto 0;
    max-width: 14ch;
    font-size: clamp(24px, 7.4vw, 29px);
    letter-spacing: -0.04em;
    line-height: 1.08;
  }

  .tcms-login-card-heading {
    padding: 20px 20px 8px;
    border-radius: 20px 20px 0 0;
  }

  .login form {
    padding: 12px 20px 20px;
    border-radius: 0 0 20px 20px;
  }

  .tcms-login-card-heading,
  .login form { box-shadow: 0 22px 56px rgba(12, 42, 68, 0.14); }

  .tcms-login-card-heading h2 {
    margin: 5px 0 4px;
    font-size: 21px;
  }

  .tcms-login-card-heading p { display: none; }

  .login form .input,
  .login input[type="password"],
  .login input[type="text"] {
    min-height: 48px;
    margin: 6px 0 14px;
  }

  .login .forgetmenot {
    margin-bottom: 8px;
  }

  .wp-core-ui.login #wp-submit {
    min-height: 48px;
    line-height: 48px;
  }

  .login #nav,
  .login #backtoblog {
    margin-top: 6px;
  }

  .login #nav a,
  .login #backtoblog a {
    min-height: 40px;
    padding-inline: 12px;
  }
}

@media (max-width: 350px) {
  .tcms-login-story h1 { font-size: 23px; }
  .tcms-login-card-heading { padding-inline: 18px; }
  .login form { padding-inline: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  body.login::before,
  body.login::after { animation: none; }
  .wp-core-ui.login #wp-submit { transition: none; }
  .login .button-primary:hover,
  .login .button-primary:focus { transform: none; }
}
