/* Auth — в стиле лендинга KlikUm KIDS */
.lk-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lk-auth-modal[hidden] {
  display: none !important;
}

body.lk-auth-open {
  overflow: hidden;
}

.lk-auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 46, 0.45);
  backdrop-filter: blur(4px);
}

.lk-auth-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: min(92vh, 820px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-radius: var(--lk-r, 24px);
  padding: 28px 26px 24px;
  background: #fff;
  border: 1px solid var(--lk-panel-border, #f5ebe2);
  box-shadow: var(--lk-shadow-lg, 0 12px 40px rgba(26, 26, 46, 0.12));
}

.lk-auth-modal__dialog::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.lk-auth-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--lk-peach, #fff5ee);
  color: var(--lk-muted, #8b8b9e);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lk-auth-modal__close:hover {
  background: var(--lk-orange-l, #fff0eb);
  color: var(--lk-dark, #1a1a2e);
}

.lk-auth__head {
  text-align: center;
  margin-bottom: 20px;
  padding-right: 28px;
}

.lk-auth__head h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--lk-dark, #1a1a2e);
}

.lk-auth__head p {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--lk-muted, #8b8b9e);
}

.lk-auth__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.lk-auth__tab {
  border: 2px solid var(--lk-border, #eee8e0);
  background: #fff;
  color: var(--lk-text, #2d2d3e);
  border-radius: 14px;
  padding: 11px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.lk-auth__tab.is-active {
  background: linear-gradient(135deg, var(--lk-orange, #ff6b35) 0%, #ff7a45 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.28);
}

.lk-auth__form {
  display: grid;
  gap: 12px;
}

.lk-auth__form > label,
.lk-auth__extra label {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  width: 100%;
  font-size: 13px;
  font-weight: 800;
  color: var(--lk-dark, #1a1a2e);
}

.lk-auth__form input,
.lk-auth__form select {
  border: 2px solid var(--lk-border, #eee8e0);
  border-radius: 12px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--lk-dark, #1a1a2e);
  background: #fff;
  transition: border-color 0.2s;
}

.lk-auth__form input:focus,
.lk-auth__form select:focus {
  outline: none;
  border-color: var(--lk-purple, #7c5cff);
}

.lk-auth__extra {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  width: 100%;
}

.lk-auth__extra.is-hidden,
.lk-auth__password-wrap.is-hidden,
.lk-auth__signin-only.is-hidden,
.lk-auth__recover.is-hidden,
.lk-auth__recover-sent.is-hidden,
.lk-auth__confirm-sent.is-hidden,
.lk-auth__reset.is-hidden,
.lk-auth__tabs.is-hidden,
.lk-auth__extra[hidden],
.lk-auth__password-wrap[hidden],
.lk-auth__signin-only[hidden],
.lk-auth__recover[hidden],
.lk-auth__recover-sent[hidden],
.lk-auth__confirm-sent[hidden],
.lk-auth__reset[hidden],
.lk-auth__tabs[hidden] {
  display: none !important;
}

.lk-auth__hint--success {
  color: #0d7a4a;
}

.lk-auth__sent-email {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--lk-text, #2a2a3a);
  word-break: break-all;
}

.lk-auth.is-auth-recover-sent .lk-auth__submit,
.lk-auth.is-auth-confirm-sent .lk-auth__submit {
  display: none !important;
}

.lk-auth__confirm-sent {
  display: grid;
  gap: 10px;
}

.lk-auth__btn-secondary {
  justify-self: stretch;
  margin: 0;
  padding: 10px 14px;
  border: 2px solid var(--lk-line, #eee8e0);
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--lk-purple-d, #5b3fd4);
  cursor: pointer;
}

.lk-auth__btn-secondary:hover {
  border-color: var(--lk-orange, #ff6b35);
  color: var(--lk-orange, #ff6b35);
}

.lk-auth__btn-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.lk-auth__status.is-ok {
  color: #0d7a4a;
  font-weight: 700;
}

.lk-auth__status.is-err {
  color: #c62828;
  font-weight: 700;
}

.lk-auth__hint {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--lk-muted, #8b8b9e);
}

.lk-auth__forgot,
.lk-auth__back {
  justify-self: start;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--lk-purple-d, #5b3fd4);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lk-auth__forgot:hover,
.lk-auth__back:hover {
  color: var(--lk-orange, #ff6b35);
}

.lk-auth__back {
  margin-top: 4px;
  text-decoration: none;
}

.lk-auth__back:hover {
  text-decoration: underline;
}

.lk-auth__legal {
  margin: 0;
  padding: 12px 12px 10px;
  border: 1px solid var(--lk-border, #eee8e0);
  border-radius: 14px;
  background: var(--lk-peach, #fff5ee);
  display: grid;
  gap: 8px;
}

.lk-auth__legal.is-hidden {
  display: none;
}

.lk-auth__legal.is-err {
  border-color: #e57373;
  background: #fff5f5;
  box-shadow: 0 0 0 2px rgba(229, 115, 115, 0.25);
}

.lk-auth__extra.is-err {
  border: 1px solid #e57373;
  border-radius: 14px;
  padding: 12px;
  background: #fff5f5;
  box-shadow: 0 0 0 2px rgba(229, 115, 115, 0.2);
}

.lk-auth__req {
  color: #c62828;
  font-weight: 800;
}

.lk-auth__legal-title {
  margin: 0 0 2px;
  padding: 0;
  font-size: 11px;
  font-weight: 800;
  color: var(--lk-muted, #8b8b9e);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lk-auth__check {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--lk-muted, #8b8b9e);
  cursor: pointer;
}

.lk-auth__check.is-hidden {
  display: none;
}

.lk-auth__check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--lk-orange, #ff6b35);
  cursor: pointer;
}

.lk-auth__check a {
  color: var(--lk-purple-d, #5b3fd4);
  font-weight: 700;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lk-auth__check a:hover {
  color: var(--lk-orange, #ff6b35);
}

.is-auth-parent .lk-auth__field--student-only {
  display: none;
}

.lk-dadata {
  position: relative;
  width: 100%;
  min-width: 0;
}

.lk-dadata input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  display: block;
}

.lk-dadata__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--lk-border, #eee8e0);
  border-radius: 12px;
  box-shadow: var(--lk-shadow, 0 6px 22px rgba(26, 26, 46, 0.08));
}

.lk-dadata__list[hidden] {
  display: none !important;
}

.lk-dadata__item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  text-align: left;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--lk-text, #2d2d3e);
  cursor: pointer;
}

.lk-dadata__item:hover {
  background: var(--lk-purple-l, #f0ebff);
}

.lk-auth__submit {
  margin-top: 4px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--lk-orange, #ff6b35) 0%, #ff5c28 100%);
  box-shadow: 0 8px 22px rgba(255, 107, 53, 0.32);
  transition: transform 0.2s, box-shadow 0.2s;
}

.lk-auth__submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(255, 107, 53, 0.38);
}

.lk-auth__submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.lk-auth__status {
  min-height: 20px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--lk-purple-d, #5b3fd4);
  text-align: center;
}

/* Standalone auth.html */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  font-family: "Nunito", system-ui, sans-serif;
  background: var(--lk-bg, #fff9f0);
}

.auth-page .back-link {
  position: fixed;
  top: 16px;
  left: 16px;
  text-decoration: none;
  color: var(--lk-purple-d, #5b3fd4);
  font-weight: 800;
  font-size: 14px;
}

.auth-page .lk-auth-modal__dialog {
  max-height: none;
}

@media (max-width: 768px) {
  .lk-auth-modal {
    padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px))
      max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    align-items: flex-end;
  }

  .lk-auth-modal__dialog {
    max-height: min(92dvh, 820px);
    padding: 22px 18px 20px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .lk-auth__head h2 {
    font-size: 1.35rem;
  }

  .lk-auth__field input,
  .lk-auth__field select {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .lk-auth-modal__dialog {
    padding: 20px 16px 18px;
  }
}
