body.woocommerce-account:not(.logged-in),
body.plus-myaccount:not(.logged-in) {
  background: #fbfaf7 !important;
}

body.woocommerce-account:not(.logged-in) main.all_center,
body.plus-myaccount:not(.logged-in) main.all_center {
  width: 100% !important;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 18px;
  background:
    radial-gradient(circle at 16% 24%, rgba(226, 186, 82, 0.14), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #fbfaf7 100%) !important;
}

body.woocommerce-account:not(.logged-in) .login_container,
body.plus-myaccount:not(.logged-in) .login_container {
  width: min(1120px, calc(100vw - 32px)) !important;
  max-width: 1120px !important;
  min-width: 0 !important;
  margin: 0 auto !important;
}

body.woocommerce-account:not(.logged-in) .login_container .white_card,
body.plus-myaccount:not(.logged-in) .login_container .white_card {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.woocommerce-account:not(.logged-in) .mig-account-auth--inline,
body.plus-myaccount:not(.logged-in) .mig-account-auth--inline {
  width: min(1120px, calc(100vw - 32px)) !important;
  max-width: 1120px !important;
  margin: 0 auto !important;
}

body.woocommerce-account:not(.logged-in) .mig-account-auth--inline .mig-auth,
body.plus-myaccount:not(.logged-in) .mig-account-auth--inline .mig-auth {
  width: 100% !important;
  max-width: 1120px !important;
}

.mig-auth {
  direction: rtl;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  color: #171717;
  font-family: inherit;
}

.mig-auth *,
.mig-auth *::before,
.mig-auth *::after {
  box-sizing: border-box;
}

.mig-auth button {
  box-shadow: none !important;
  text-transform: none !important;
}

.mig-auth-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  background: linear-gradient(135deg, #111111 0%, #c99b2e 100%);
  color: #fff;
  font: inherit;
  font-weight: 800;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(201, 155, 46, 0.25);
}

.mig-auth-trigger:hover,
.mig-auth-trigger:focus {
  color: #fff;
  text-decoration: none;
}

.mig-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(12, 10, 7, 0.62);
  backdrop-filter: blur(10px);
}

.mig-auth-modal[hidden] {
  display: none;
}

.mig-auth-modal__dialog {
  position: relative;
  width: min(100%, 1120px);
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.mig-auth-modal .mig-auth {
  margin: 0;
}

.mig-auth-modal__close {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #171717;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(20, 16, 8, 0.14);
}

.mig-woocommerce-auth {
  margin-bottom: 28px;
}

.mig-auth-shell {
  direction: ltr;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(320px, 0.96fr) minmax(360px, 1.04fr);
  min-height: 700px;
  overflow: hidden;
  border: 1px solid rgba(35, 31, 23, 0.06);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(30, 26, 17, 0.08);
}

.mig-auth-shell > * {
  min-width: 0;
}

.mig-auth-visual,
.mig-auth-panel {
  direction: rtl;
}

.mig-auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 54px 44px;
  background:
    radial-gradient(circle at 72% 12%, rgba(255, 255, 255, 0.78), transparent 24%),
    linear-gradient(154deg, #f5efd0 0%, #f7dc77 52%, #f3c64f 100%);
}

.mig-auth-visual::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 24px;
  pointer-events: none;
}

.mig-auth-visual__brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  font-weight: 900;
  color: #242118;
}

.mig-auth-visual__mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #171717;
  color: #f5d65b;
  font-family: Georgia, serif;
  font-weight: 900;
}

.mig-auth-visual__image {
  position: relative;
  z-index: 1;
  width: min(62%, 330px);
  height: auto;
  transform: scale(1.42);
  filter: drop-shadow(0 24px 24px rgba(70, 52, 11, 0.14));
}

.mig-auth-visual__copy {
  position: relative;
  z-index: 1;
  text-align: center;
}

.mig-auth-visual__copy h3 {
  margin: 0 0 16px;
  color: #090909;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.5;
  font-weight: 950;
}

.mig-auth-visual__copy p {
  max-width: 430px;
  margin: 0 auto;
  color: #42370d;
  line-height: 2;
  font-weight: 700;
}

.mig-auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px min(6vw, 64px);
  background: #ffffff;
}

.mig-auth-panel__logo {
  display: grid;
  place-items: center;
  gap: 8px;
  margin-bottom: 34px;
  color: #171717;
  text-align: center;
}

.mig-auth-panel__logo strong {
  font-size: 18px;
  font-weight: 950;
}

.mig-auth-panel__wave {
  position: relative;
  width: 74px;
  height: 28px;
  background: none;
  border-radius: 999px;
}

.mig-auth-panel__wave::before,
.mig-auth-panel__wave::after {
  content: "";
  position: absolute;
  right: 5px;
  width: 58px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8f6a16 0%, #f3d75b 48%, #b4831d 100%);
  transform: skewX(-28deg) rotate(-9deg);
}

.mig-auth-panel__wave::before {
  top: 6px;
  box-shadow: -12px 8px 0 rgba(177, 132, 29, 0.88);
}

.mig-auth-panel__wave::after {
  top: 16px;
  width: 46px;
  right: 18px;
  opacity: 0.78;
}

.mig-card__header {
  margin-bottom: 24px;
}

.mig-card__header--center {
  text-align: center;
}

.mig-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 16px;
  border-radius: 999px;
  color: #7a5b05;
  background: rgba(235, 198, 86, 0.16);
  font-size: 12px;
  font-weight: 900;
}

.mig-card__header h2 {
  margin: 18px 0 10px;
  color: #070707;
  font-size: clamp(27px, 4vw, 38px);
  line-height: 1.35;
  font-weight: 950;
}

.mig-card__header p {
  margin: 0;
  color: #6c6c6c;
  line-height: 2;
  font-weight: 600;
}

.mig-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid #ece7dc;
}

.mig-tab {
  appearance: none;
  min-height: 52px;
  border: 0 !important;
  border-bottom: 3px solid transparent !important;
  border-radius: 0 !important;
  padding: 14px 10px 12px;
  background: transparent !important;
  color: #6b6258 !important;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.mig-tab.is-active {
  border-color: #e2ba38 !important;
  color: #111111 !important;
}

.mig-step {
  display: grid;
  gap: 14px;
}

.mig-step[hidden] {
  display: none;
}

.mig-step label {
  color: #242424;
  font-weight: 900;
}

.mig-step input[type="tel"],
.mig-step input[type="text"],
.mig-step input[type="password"] {
  width: 100%;
  min-height: 58px;
  border: 1px solid #dedede;
  border-radius: 10px;
  padding: 0 18px;
  background: #fff;
  color: #171717;
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.mig-step input::placeholder {
  color: #9c9185;
}

.mig-step input[name="mobile"],
.mig-step input[name="otp"],
.mig-step input[name="national_id"],
.mig-captcha input[name="captcha_answer"] {
  direction: ltr;
  text-align: left;
  unicode-bidi: plaintext;
}

.mig-step input:focus {
  border-color: #d2a928;
  box-shadow: 0 0 0 4px rgba(226, 186, 56, 0.14);
}

.mig-password-field {
  position: relative;
}

.mig-password-field input {
  padding-left: 72px !important;
}

.mig-password-field button {
  position: absolute;
  inset-block: 9px;
  left: 10px;
  border: 1px solid #eadbb4 !important;
  border-radius: 999px !important;
  padding: 0 12px;
  background: #fff9e8 !important;
  color: #85640f !important;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.mig-primary,
.mig-step button.mig-primary {
  width: 100%;
  min-height: 58px;
  border: 0 !important;
  border-radius: 14px !important;
  padding: 0 18px;
  background: linear-gradient(135deg, #101010 0%, #c59625 52%, #f0d15b 100%) !important;
  color: #fff !important;
  font: inherit;
  font-size: 17px;
  font-weight: 950;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 18px 36px rgba(166, 122, 24, 0.22) !important;
}

.mig-step input:valid ~ .mig-primary,
.mig-primary:hover,
.mig-primary:focus {
  background: linear-gradient(135deg, #000000 0%, #b88617 48%, #e7c34d 100%) !important;
  color: #fff !important;
  box-shadow: 0 18px 38px rgba(166, 122, 24, 0.30) !important;
}

.mig-primary:active {
  transform: translateY(1px);
}

.mig-step button:disabled,
.mig-step input:disabled {
  cursor: wait;
  opacity: 0.65;
}

.mig-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mig-row--between {
  justify-content: space-between;
}

.mig-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6c6c6c !important;
  font-size: 13px;
  font-weight: 700 !important;
}

.mig-check input {
  width: 16px;
  height: 16px;
  accent-color: #c99b2e;
}

.mig-check--terms {
  align-items: flex-start;
  line-height: 1.9;
}

.mig-check a,
.mig-switch-line button,
.mig-link {
  color: #9b7416 !important;
  text-decoration: none;
}

.mig-link,
.mig-switch-line button {
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: none !important;
}

.mig-link {
  display: inline-flex;
  width: auto !important;
  color: #9b7416 !important;
}

.mig-switch-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid #eee9df;
  color: #777;
  font-size: 13px;
  font-weight: 700;
}

.mig-captcha {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px dashed #e0c56b;
  border-radius: 12px;
  background: #fffaf0;
}

.mig-captcha__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.mig-captcha .mig-captcha__refresh {
  min-height: 48px;
  border: 0 !important;
  border-radius: 12px !important;
  padding: 0 14px;
  background: #171717 !important;
  color: #f5d65b !important;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.mig-captcha small {
  color: #7a5b05;
  font-weight: 800;
}

.mig-alert {
  margin: 0 0 18px;
  border-radius: 12px;
  padding: 13px 15px;
  line-height: 1.9;
  font-weight: 900;
  text-align: center;
}

.mig-alert--success {
  background: rgba(38, 142, 93, 0.10);
  color: #197044;
}

.mig-alert--error {
  background: #fff0f0;
  color: #bd1111;
}

.mig-otp-note {
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff9e6;
  color: #66500e;
  line-height: 1.9;
  text-align: center;
  font-weight: 800;
}

.mig-success-state {
  display: grid;
  gap: 10px;
  border-radius: 16px;
  padding: 20px;
  background: rgba(38, 142, 93, 0.10);
  color: #18643e;
  text-align: center;
  line-height: 1.8;
}

.mig-success-state strong {
  font-size: 19px;
}

@media (max-width: 900px) {
  body.woocommerce-account:not(.logged-in) main.all_center,
  body.plus-myaccount:not(.logged-in) main.all_center {
    padding: 18px;
  }

  .mig-auth-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .mig-auth-visual {
    min-height: 280px;
    padding: 34px 26px;
  }

  .mig-auth-visual__brand {
    align-self: center;
  }

  .mig-auth-visual__image {
    width: min(54%, 250px);
    transform: scale(1.28);
  }

  .mig-auth-panel {
    padding: 34px 22px;
  }
}

@media (max-width: 560px) {
  body.woocommerce-account:not(.logged-in) .login_container,
  body.plus-myaccount:not(.logged-in) .login_container {
    width: 100%;
  }

  .mig-auth-shell {
    border-radius: 18px;
  }

  .mig-auth-visual {
    display: none;
  }

  .mig-auth-panel__logo {
    margin-bottom: 22px;
  }

  .mig-tabs {
    grid-template-columns: 1fr;
  }

  .mig-row--between {
    align-items: flex-start;
    flex-direction: column;
  }

  .mig-captcha__row {
    grid-template-columns: 1fr;
  }
}
