/* ==========================================================================
   Wonders Kids — Auth pages (login / register / forgot password)
   Loaded in addition to style.css. Reuses the home page's tokens, buttons,
   badge, check-list icon and newsletter arc/dots.
   ========================================================================== */

.auth { position: relative; background: var(--hero-bg); padding: 80px 0 110px; overflow: hidden; }
.auth::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 108 22'%3E%3Cpath d='M0 22C14 2 40 0 54 0s40 2 54 22Z' fill='%23fff'/%3E%3C/svg%3E") 0 0 / 108px 22px repeat-x;
}
.auth > .container { position: relative; z-index: 1; }

/* decorative shapes */
.auth__decor > * { position: absolute; pointer-events: none; }
.auth__balloon { width: 54px; top: 60px; left: max(16px, calc(50% - 640px)); animation: float 6s ease-in-out infinite; }
.auth__cloud   { width: 150px; top: 24px; left: calc(50% - 120px); animation: float 9s ease-in-out infinite; }
.auth__zigzag  { width: 90px; top: 90px; right: max(16px, calc(50% - 650px)); }
.auth__flower  { width: 56px; bottom: 90px; left: max(16px, calc(50% - 660px)); animation: spin 22s linear infinite; }
.auth__sun     { width: 76px; bottom: 80px; right: max(16px, calc(50% - 660px)); animation: spin 20s linear infinite; }
.auth__heart   { width: 240px; top: -40px; right: -60px; }

/* card */
.auth-card {
  display: grid; grid-template-columns: 420px 1fr; max-width: 1000px; margin-inline: auto;
  background: #fff; border-radius: 24px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(6, 4, 46, .10), 0 2px 0 rgba(6, 4, 46, .03);
}
.auth-card--wide { max-width: 1100px; grid-template-columns: 400px 1fr; }

/* aside */
.auth-card__aside {
  position: relative; background: var(--primary); color: #fff; overflow: hidden;
  display: flex; flex-direction: column; padding: 48px 40px 0; min-height: 560px;
}
.auth-aside__swirl { position: absolute; top: 0; right: -80px; width: 340px; color: rgba(255,255,255,.12); }
.auth-aside__star  { position: absolute; top: 34px; right: 34px; width: 38px; animation: float 7s ease-in-out infinite; }
.auth-aside__content { position: relative; z-index: 1; }
.auth-aside__eyebrow { font-family: var(--font-heading); font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: #CFCCFF; margin-bottom: 12px; }
.auth-aside__title { color: #fff; font-size: 32px; font-weight: 700; line-height: 1.18; letter-spacing: -.02em; margin-bottom: 14px; max-width: 300px; }
.auth-aside__text { color: #E5E3FF; font-size: 15.5px; line-height: 1.65; margin-bottom: 22px; }
.auth-aside__list { display: grid; gap: 12px; }
.auth-aside__list li { display: flex; align-items: center; gap: 12px; font-family: var(--font-heading); font-weight: 600; font-size: 15.5px; }
.auth-aside__media { position: relative; margin-top: auto; height: 250px; display: flex; align-items: flex-end; justify-content: center; }
.auth-aside__media .newsletter__arc { width: 300px; height: 300px; bottom: -150px; border-width: 36px; }
.auth-aside__media .newsletter__dots { top: 20px; right: 10px; }
.auth-aside__media img { position: relative; width: 210px; }

/* main */
.auth-card__main { padding: 52px 56px; display: flex; flex-direction: column; justify-content: center; }
.auth-card__main .badge { align-self: flex-start; margin-bottom: 14px; }
.auth-title { font-size: 34px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px; }
.auth-subtitle { font-size: 16px; color: var(--body); margin-bottom: 30px; }
.auth-subtitle strong { color: var(--heading); word-break: break-all; }

.auth-form { display: grid; gap: 4px; }
.field { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.field__label { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 14.5px; color: var(--heading); margin-bottom: 8px; padding: 0; }
.field__control { position: relative; display: flex; align-items: center; }
.field__icon { position: absolute; left: 20px; width: 19px; height: 19px; color: #8D9DB5; pointer-events: none; transition: color .2s; }
.field__input {
  width: 100%; height: 54px; border: 1px solid var(--border); border-radius: 50px; background: #fff;
  padding: 0 20px 0 50px; font-size: 15px; color: var(--heading);
  transition: border-color .2s, box-shadow .2s;
}
.field__input::placeholder { color: #A3AEC2; }
.field__input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(87, 81, 225, .12); }
.field__control:focus-within .field__icon { color: var(--primary); }
.field__control:has(.field__toggle) .field__input { padding-right: 54px; }
.field__input[aria-invalid="true"] { border-color: #E5484D; box-shadow: 0 0 0 4px rgba(229, 72, 77, .10); }
.field__toggle {
  position: absolute; right: 8px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: #8D9DB5; transition: color .2s, background .2s;
}
.field__toggle:hover { color: var(--primary); background: var(--primary-soft); }
.field__toggle .wk-icon { width: 19px; height: 19px; }
.field__toggle .icon-hide, .field__toggle[aria-pressed="true"] .icon-show { display: none; }
.field__toggle[aria-pressed="true"] .icon-hide { display: block; }
.field__hint { font-size: 13px; color: #8D8CA0; margin: 6px 0 0 18px; line-height: 1.5; }
.field__error { font-size: 13px; color: #D9363E; margin: 6px 0 0 18px; line-height: 1.4; min-height: 0; }
.field__error:empty { display: none; }

/* password strength */
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 10px 14px 0; }
.strength span { height: 4px; border-radius: 4px; background: #E7E7EE; transition: background .25s; }
.strength[data-level="1"] span:nth-child(-n+1) { background: #E5484D; }
.strength[data-level="2"] span:nth-child(-n+2) { background: #F29A4B; }
.strength[data-level="3"] span:nth-child(-n+3) { background: var(--yellow); }
.strength[data-level="4"] span { background: #46A758; }

/* checkbox */
.checkbox { display: inline-flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--body); cursor: pointer; line-height: 1.5; }
.checkbox input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.checkbox__box {
  flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 1.5px solid #B9B9C6;
  display: grid; place-items: center; color: #fff; background: #fff; transition: background .2s, border-color .2s;
}
.checkbox__box .wk-icon { width: 14px; height: 14px; stroke-width: 3; opacity: 0; transition: opacity .15s; }
.checkbox input:checked + .checkbox__box { background: var(--primary); border-color: var(--primary); }
.checkbox input:checked + .checkbox__box .wk-icon { opacity: 1; }
.checkbox input:focus-visible + .checkbox__box { outline: 3px solid var(--yellow); outline-offset: 2px; }
.checkbox input[aria-invalid="true"] + .checkbox__box { border-color: #E5484D; }

.auth-form__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 2px 0 22px; }
.auth-link { color: var(--primary); font-weight: 600; }
.auth-link:hover { color: var(--heading); text-decoration: underline; text-underline-offset: 3px; }

/* submit button states */
.btn--block { width: 100%; margin-top: 6px; }
.btn__spinner {
  display: none; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn.is-loading { pointer-events: none; opacity: .9; }
.btn.is-loading .btn__spinner { display: block; }
.btn.is-loading .wk-icon { display: none; }

.form-status { margin-top: 14px; padding: 12px 16px; border-radius: 12px; font-size: 14.5px; line-height: 1.5; }
.form-status.is-error { background: #FDECEC; color: #B4232A; }
.form-status.is-success { background: #EAF7EC; color: #22713A; }
.form-status.is-info { background: var(--primary-soft); color: var(--primary-dark); }

.auth-switch { margin-top: 26px; text-align: center; font-size: 15px; }
.auth-back { display: inline-flex; align-items: center; gap: 8px; align-self: center; margin-top: 26px; font-family: var(--font-heading); font-weight: 600; color: var(--heading); }
.auth-back .wk-icon { width: 18px; height: 18px; transition: transform .2s; }
.auth-back:hover { color: var(--primary); }
.auth-back:hover .wk-icon { transform: translateX(-4px); }

/* success views */
.auth-success { text-align: center; display: flex; flex-direction: column; align-items: center; }
.auth-success .auth-subtitle { max-width: 380px; }
.auth-success__icon {
  width: 72px; height: 72px; border-radius: 50%; background: var(--yellow); color: var(--heading);
  display: grid; place-items: center; margin-bottom: 20px; border: 2px solid var(--heading); box-shadow: 4px 5px 0 rgba(6, 4, 46, .2);
}
.auth-success__icon .wk-icon { width: 30px; height: 30px; }
.auth-success__icon--soft { width: 60px; height: 60px; background: var(--primary-soft); color: var(--primary); border: 0; box-shadow: none; margin-bottom: 18px; }
.auth-success__icon--soft .wk-icon { width: 26px; height: 26px; }
[data-view="success"]:not([hidden]) { animation: pop .45s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* responsive */
@media (max-width: 991px) {
  .auth { padding: 50px 0 90px; }
  .auth-card, .auth-card--wide { grid-template-columns: 1fr; max-width: 620px; }
  .auth-card__aside { min-height: 0; padding: 34px 32px 0; }
  .auth-aside__title { font-size: 26px; max-width: none; }
  .auth-aside__media { height: 190px; margin-top: 10px; }
  .auth-aside__media img { width: 160px; }
  .auth-aside__media .newsletter__arc { width: 230px; height: 230px; bottom: -115px; border-width: 30px; }
  .auth-aside__list { grid-template-columns: 1fr 1fr; }
  .auth__heart { display: none; }
}
@media (max-width: 575px) {
  .auth-card { border-radius: 18px; }
  .auth-card__main { padding: 34px 22px; }
  .auth-card__aside { padding: 28px 22px 0; }
  .auth-aside__text, .auth-aside__list { display: none; }
  .auth-aside__media { height: 150px; }
  .auth-aside__media img { width: 130px; }
  .auth-aside__media .newsletter__arc { width: 190px; height: 190px; bottom: -95px; border-width: 26px; }
  .auth-aside__media .newsletter__dots { display: none; }
  .auth-title { font-size: 28px; }
  .field-grid { grid-template-columns: 1fr; }
  .auth__balloon, .auth__cloud, .auth-aside__star { display: none; }
}
