:root {
  --auth-ink: #173a36;
  --auth-green: #118f80;
  --auth-green-deep: #0b645a;
  --auth-line: #dce6e2;
  --auth-muted: #758984;
  --auth-canvas: #f2f6f3;
  --font: "Aptos", "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--auth-ink);
  background: var(--auth-canvas);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 0.92fr) minmax(500px, 1.08fr);
}

.auth-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 42px clamp(36px, 5vw, 72px);
  color: #f0fbf8;
  background:
    radial-gradient(circle at 18% 8%, rgba(77, 202, 174, 0.22), transparent 31%),
    radial-gradient(circle at 88% 88%, rgba(226, 166, 58, 0.13), transparent 27%),
    linear-gradient(145deg, #103f39, #082722 68%);
}

.auth-brand-panel::before,
.auth-brand-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(133, 223, 204, 0.09);
  border-radius: 50%;
}

.auth-brand-panel::before {
  right: -190px;
  bottom: -170px;
  width: 520px;
  height: 520px;
  box-shadow:
    0 0 0 58px rgba(133, 223, 204, 0.018),
    0 0 0 120px rgba(133, 223, 204, 0.01);
}

.auth-brand-panel::after {
  top: 28%;
  left: -150px;
  width: 340px;
  height: 340px;
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}

.auth-mark {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  color: #8ddcd1;
  background: rgba(126, 218, 205, 0.08);
  border: 1px solid rgba(148, 226, 214, 0.15);
  border-radius: 14px;
}

.auth-mark svg {
  width: 35px;
  height: 35px;
}

.auth-brand > span:last-child {
  display: flex;
  flex-direction: column;
}

.auth-brand strong {
  font-size: 23px;
  letter-spacing: 0.08em;
}

.auth-brand small {
  color: #7fa9a2;
  font-size: 10px;
  letter-spacing: 0.16em;
}

.auth-brand-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: auto 0;
}

.auth-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #90c8bd;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.auth-kicker i {
  width: 7px;
  height: 7px;
  background: #4ed0b8;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(78, 208, 184, 0.1);
}

.auth-brand-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 4.2vw, 62px);
  line-height: 1.13;
  letter-spacing: -0.055em;
}

.auth-brand-copy p {
  max-width: 500px;
  color: #9ec1bb;
  font-size: 15px;
  line-height: 1.8;
}

.auth-proof {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-proof span {
  padding: 7px 11px;
  color: #a9ccc5;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  font-size: 11px;
}

.auth-form-panel {
  display: grid;
  place-items: center;
  padding: 36px 24px;
}

.auth-card {
  width: min(510px, 100%);
  padding: clamp(26px, 4vw, 42px);
  background: #fff;
  border: 1px solid #e1e9e6;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(12, 55, 48, 0.09);
}

.auth-card > header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.auth-security {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #168879;
  background: #eaf6f2;
  border-radius: 12px;
}

.auth-card header p {
  margin: 0;
  color: #8a9c97;
  font-size: 12px;
}

.auth-card h2 {
  margin: 1px 0 0;
  font-size: 25px;
  letter-spacing: -0.025em;
}

.auth-role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.auth-role-grid button {
  min-height: 50px;
  padding: 9px 11px;
  text-align: left;
  color: #607872;
  background: #f8faf9;
  border: 1px solid #e2e9e6;
  border-radius: 9px;
  cursor: pointer;
}

.auth-role-grid button strong,
.auth-role-grid button small {
  display: block;
}

.auth-role-grid button strong {
  font-size: 13px;
}

.auth-role-grid button small {
  color: #91a09c;
  font-size: 10px;
}

.auth-role-grid button.active {
  color: #126f63;
  background: #eaf6f2;
  border-color: #bcded5;
  box-shadow: inset 3px 0 #159684;
}

.provider-register-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -7px 0 13px;
  padding: 9px 11px;
  color: #71857f;
  background: #f7faf8;
  border: 1px solid #dfe9e5;
  border-radius: 8px;
  font-size: 11px;
  text-decoration: none;
}

.provider-register-link strong {
  color: #147a6c;
}

.provider-register-link:hover {
  background: #edf7f3;
  border-color: #cfe4dd;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 14px;
}

.auth-field > span {
  color: #536c66;
  font-size: 12px;
  font-weight: 600;
}

.auth-field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  color: #243f3a;
  background: #fbfcfb;
  border: 1px solid #dce5e1;
  border-radius: 9px;
  outline: none;
  font-size: 14px;
}

.auth-field input:focus {
  background: #fff;
  border-color: #48ad9e;
  box-shadow: 0 0 0 4px rgba(25, 157, 137, 0.1);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 61px;
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 9px;
  padding: 5px 7px;
  color: #52756d;
  background: transparent;
  border: 0;
  font-size: 11px;
  cursor: pointer;
  transform: translateY(-50%);
}

.auth-error {
  min-height: 20px;
  margin: 9px 0 0;
  color: #c54e3d;
  font-size: 11px;
}

.auth-submit {
  width: 100%;
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: linear-gradient(135deg, #168f80, #0e766a);
  border: 0;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(18, 135, 120, 0.19);
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.auth-submit svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo-accounts {
  margin-top: 21px;
  padding: 13px;
  background: #f6f9f7;
  border: 1px dashed #d8e3de;
  border-radius: 9px;
}

.demo-accounts > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.demo-accounts strong {
  font-size: 12px;
}

.demo-accounts span {
  color: #93a09c;
  font-size: 10px;
}

.demo-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid #e8eeeb;
}

.demo-account-row span {
  color: #627a73;
  font-size: 11px;
}

.demo-account-row code {
  color: #315d55;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
}

.demo-account-row button {
  padding: 3px 7px;
  color: #167b6e;
  background: #fff;
  border: 1px solid #d5e5df;
  border-radius: 5px;
  font-size: 10px;
  cursor: pointer;
}

.auth-card > footer {
  margin-top: 18px;
  color: #98a5a1;
  font-size: 10px;
  text-align: center;
}

@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    min-height: 230px;
    padding: 25px 22px;
  }

  .auth-brand-copy {
    margin: 34px 0 20px;
  }

  .auth-brand-copy h1 {
    margin: 10px 0 8px;
    font-size: 31px;
  }

  .auth-brand-copy p {
    font-size: 13px;
  }

  .auth-proof {
    display: none;
  }

  .auth-form-panel {
    padding: 18px 14px 28px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 22px 17px;
    border-radius: 16px;
  }

  .auth-card h2 {
    font-size: 22px;
  }

  .auth-role-grid {
    grid-template-columns: 1fr;
  }

  .demo-account-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}
