.lks-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  color: #101828;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.lks-auth-modal.is-open {
  display: grid;
  place-items: center;
  padding: 24px;
}

.lks-auth-modal[aria-hidden="true"] {
  pointer-events: none;
}

.lks-auth-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 22, 0.54);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.lks-auth-dialog {
  position: relative;
  z-index: 1;
  width: min(880px, 92vw);
  height: min(560px, calc(100vh - 48px));
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 38px 100px rgba(6, 13, 31, 0.34), 0 10px 30px rgba(6, 13, 31, 0.18);
  animation: lksAuthIn 220ms cubic-bezier(.2,.8,.2,1) both;
}

@keyframes lksAuthIn {
  from { opacity: 0; transform: translateY(14px) scale(.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.lks-auth-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.lks-auth-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.lks-auth-close:hover {
  transform: translateY(-1px);
  background: #fff;
  border-color: rgba(17, 24, 39, 0.16);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
}

.lks-auth-close:disabled,
.lks-auth-modal.is-processing .lks-auth-close {
  opacity: .48;
  cursor: not-allowed;
  transform: none;
}

.lks-auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%;
  min-height: 0;
}

.lks-auth-artwork {
  min-width: 0;
  height: calc(100% - 28px);
  margin: 14px 0 14px 14px;
  overflow: hidden;
  border-radius: 22px;
  background: #eef4ff;
}

.lks-auth-artwork img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.lks-auth-content {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-items: center;
  padding: 46px 50px 42px 48px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 24, 39, .22) transparent;
}

.lks-auth-panel {
  display: none;
  width: 100%;
  min-width: 0;
}

.lks-auth-panel.is-active {
  display: block;
}

.lks-auth-brand {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-height: 42px;
  margin: 0 0 26px;
}

.lks-auth-brand img {
  display: block;
  max-width: 154px;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lks-auth-brand span {
  color: #101828;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.lks-auth-panel h2 {
  margin: 0;
  color: #101828;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: 0;
}

.lks-auth-copy {
  margin: 9px 0 26px;
  color: #667085;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
}

.lks-auth-message {
  display: none;
  margin: -8px 0 16px;
  padding: 11px 13px;
  border: 1px solid #ffd0d0;
  border-radius: 14px;
  background: #fff5f5;
  color: #b42318;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.lks-auth-message.is-visible {
  display: block;
}

.lks-auth-message.is-success {
  border-color: #b7ebcf;
  background: #f0fdf4;
  color: #067647;
}

.lks-auth-panel form {
  display: grid;
  gap: 15px;
}

.lks-auth-field {
  display: grid;
  gap: 8px;
  margin: 0;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.lks-auth-field > span:first-child {
  line-height: 1.2;
}

.lks-auth-panel input[type="text"],
.lks-auth-panel input[type="email"],
.lks-auth-panel input[type="password"] {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  background: #fff;
  color: #101828;
  box-shadow: none;
  font-size: 15px;
  line-height: 1.2;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.lks-auth-panel input[type="text"]:focus,
.lks-auth-panel input[type="email"]:focus,
.lks-auth-panel input[type="password"]:focus,
.lks-auth-password:focus-within {
  border-color: #98a2b3;
  box-shadow: 0 0 0 4px rgba(16, 24, 40, 0.06);
}

.lks-auth-password {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  min-height: 48px;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.lks-auth-password input[type="password"],
.lks-auth-password input[type="text"] {
  min-height: 46px;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding-right: 8px;
}

.lks-auth-password button {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #667085;
  cursor: pointer;
  transition: color 160ms ease, transform 160ms ease;
}

.lks-auth-password button:hover {
  color: #101828;
}

.lks-auth-password button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lks-auth-password button.is-visible {
  color: #101828;
}

.lks-auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: -2px 0 2px;
  color: #667085;
  font-size: 13px;
}

.lks-auth-row a {
  color: #101828;
  font-weight: 700;
  text-decoration: none;
}

.lks-auth-row a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lks-auth-check {
  display: inline-flex !important;
  align-items: center;
  gap: 8px !important;
  margin: 0;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.lks-auth-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #101828;
}

.lks-auth-primary,
.lks-auth-google {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.lks-auth-primary {
  border: 0;
  background: #111827;
  color: #fff;
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.24);
  cursor: pointer;
}

.lks-auth-primary:hover {
  transform: translateY(-1px);
  background: #020617;
  box-shadow: 0 20px 42px rgba(17, 24, 39, 0.28);
}

.lks-auth-primary.is-loading {
  opacity: .72;
  cursor: wait;
  pointer-events: none;
  transform: none;
}

.lks-auth-google {
  margin-top: 14px;
  border: 1px solid #e4e7ec;
  background: #fff;
  color: #101828;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
}

.lks-auth-google:hover {
  transform: translateY(-1px);
  border-color: #d0d5dd;
  background: #fbfbfd;
  color: #101828;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.08);
}

.lks-auth-google svg {
  flex: 0 0 auto;
}

.lks-auth-switchline {
  margin: 18px 0 0;
  color: #667085;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.lks-auth-switchline button {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #101828;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  text-decoration: none;
}

.lks-auth-switchline button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.lks-auth-lock {
  overflow: hidden;
}

@media (min-width: 768px) and (max-width: 1024px) {
  .lks-auth-dialog {
    width: min(860px, 92vw);
    height: min(552px, calc(100vh - 42px));
  }

  .lks-auth-shell {
    grid-template-columns: 40% 60%;
  }

  .lks-auth-content {
    padding: 38px 44px 36px 42px;
  }

  .lks-auth-panel h2 {
    font-size: 31px;
  }
}

@media (max-width: 767px) {
  .lks-auth-modal.is-open {
    place-items: center;
    padding: 12px;
  }

  .lks-auth-dialog {
    width: min(420px, calc(100vw - 24px));
    height: auto;
    min-height: 0;
    max-height: calc(100vh - 24px);
    border-radius: 22px;
    overflow: hidden;
  }

  .lks-auth-shell {
    display: block;
    height: auto;
  }

  .lks-auth-artwork {
    display: none;
  }

  .lks-auth-content {
    display: block;
    padding: 34px 24px 26px;
    max-height: calc(100vh - 24px);
    overflow: auto;
  }

  .lks-auth-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
  }

  .lks-auth-brand {
    justify-content: center;
    margin-bottom: 22px;
    padding-right: 28px;
  }

  .lks-auth-brand img {
    max-width: 142px;
    max-height: 44px;
  }

  .lks-auth-panel h2,
  .lks-auth-copy {
    text-align: center;
  }

  .lks-auth-panel h2 {
    font-size: 29px;
  }

  .lks-auth-copy {
    margin-bottom: 24px;
  }

  .lks-auth-row {
    gap: 10px;
    font-size: 13px;
  }

  .lks-auth-primary,
  .lks-auth-google {
    min-height: 54px;
  }
}

@media (max-width: 380px) {
  .lks-auth-content {
    padding: 32px 18px 24px;
  }

  .lks-auth-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .lks-auth-check {
    white-space: normal;
  }
}
