:root {
  color: #172033;
  background: #eef2f7;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(15, 118, 110, 0.04) 1px, transparent 1px),
    #eef2f7;
  background-size: 32px 32px;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(420px, 1.15fr);
  width: min(980px, 100%);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid #d7dee9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.login-context {
  display: flex;
  flex-direction: column;
  padding: 38px;
  color: #fff;
  background: #0f3d3a;
}

.brand {
  display: grid;
  justify-items: start;
  gap: 12px;
  width: fit-content;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 300px;
  height: 90px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0;
  background: #fff url("assets/brand/yunke-crm/png/yunke-crm-wordmark-color.png") center / 100% 100% no-repeat;
  font-size: 0;
}

.brand > span:not(.brand-mark):not(.brand-portal-label) {
  display: none;
}

.brand span {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 20px;
}

.brand small {
  color: #b9d5d1;
  font-size: 12px;
}

.brand-portal-label {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  margin-left: 0;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  color: #e4f6f3;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.context-copy {
  margin: 48px 0 24px;
}

.eyebrow {
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.login-context .eyebrow {
  color: #8ce0d5;
}

.context-copy h1 {
  max-width: 420px;
  margin: 12px 0 14px;
  font-size: clamp(30px, 3.4vw, 36px);
  line-height: 1.16;
  letter-spacing: 0;
}

.context-copy p {
  max-width: 390px;
  margin: 0;
  color: #c6dcd9;
  font-size: 15px;
  line-height: 1.75;
}

.product-preview {
  margin: 0 0 24px;
  overflow: hidden;
  aspect-ratio: 1.55;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(3, 23, 22, 0.28);
}

.product-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.security-note {
  display: grid;
  gap: 6px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.security-note strong {
  font-size: 13px;
}

.security-note span {
  color: #b9d5d1;
  font-size: 12px;
  line-height: 1.6;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px clamp(30px, 6vw, 70px);
}

.login-heading h2 {
  margin: 7px 0 8px;
  color: #101828;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: 0;
}

.login-heading p {
  margin: 0;
  color: #667085;
  font-size: 14px;
}

.login-mode-switch {
  display: grid;
  gap: 4px;
  padding: 4px;
  border: 1px solid #dce3ed;
  border-radius: 7px;
  background: #f5f7fa;
}

.login-mode-switch {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 24px 0 22px;
}

.login-mode-switch button {
  min-height: 38px;
  padding: 7px 9px;
  border: 0;
  border-radius: 5px;
  color: #475467;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.login-mode-switch button[aria-selected="true"] {
  color: #0f766e;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

#loginForm,
#passwordFields,
#smsFields {
  display: grid;
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.form-field small {
  color: #8490a3;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}

.form-field input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #cfd8e6;
  border-radius: 6px;
  color: #172033;
  background: #fff;
  outline: none;
}

.form-field input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.13);
}

.password-control,
.sms-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.password-control input,
.sms-control input {
  border-radius: 6px 0 0 6px;
}

.password-control button,
.sms-control button {
  min-width: 74px;
  padding: 0 12px;
  border: 1px solid #cfd8e6;
  border-left: 0;
  border-radius: 0 6px 6px 0;
  color: #0f766e;
  background: #f8fafc;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.password-control button:disabled,
.sms-control button:disabled,
.submit-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.login-message {
  min-height: 20px;
  color: #667085;
  font-size: 12px;
  line-height: 1.55;
}

.login-message.error {
  color: #b42318;
}

.login-message.success {
  color: #067647;
}

.submit-button {
  width: 100%;
  height: 46px;
  border: 1px solid #0f766e;
  border-radius: 6px;
  color: #fff;
  background: #0f766e;
  cursor: pointer;
  font-weight: 800;
}

.submit-button:hover {
  background: #0b625c;
}

.login-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e5e9f0;
  color: #667085;
  font-size: 12px;
}

.login-footer a {
  color: #0f766e;
  font-weight: 750;
  text-decoration: none;
}

.signup-action {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.login-footer a:last-child {
  margin-left: auto;
}

[hidden] {
  display: none !important;
}

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

  .login-shell {
    display: block;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .login-context {
    display: block;
    padding: 24px 22px;
  }

  .context-copy {
    margin: 28px 0 4px;
  }

  .context-copy h1 {
    margin: 8px 0;
    font-size: 25px;
  }

  .context-copy p,
  .product-preview,
  .security-note {
    display: none;
  }

  .login-panel {
    padding: 30px 22px 38px;
  }

  .brand {
    gap: 10px;
  }

  .brand-portal-label {
    margin-left: 0;
  }

  .login-footer a:last-child {
    margin-left: 0;
  }
}
