/* ===============================
   SIGNUP MOBILE LAYER
   =============================== */

@media (max-width: 1023.98px) {

  .signup-page .input-group[data-field="confirmPassword"] {
    gap: 10px;
  }

  .signup-page .input-group[data-field="confirmPassword"] .field-label {
    margin: 0;
  }

  .signup-page .input-group[data-field="confirmPassword"] .input-control {
    position: relative;
  }

  .signup-page .input-group[data-field="confirmPassword"] .input-control > i {
    left: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 0.98rem;
  }

  .signup-page .input-group[data-field="confirmPassword"] input {
    min-height: 58px;
    padding: 16px 56px 16px 46px;
    border-radius: 18px;
  }

  .signup-page .input-group[data-field="confirmPassword"] .toggle-secondary-password {
    position: absolute;
    top: 50%;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #7c8b99;
    transition: color 220ms cubic-bezier(0.22, 1, 0.36, 1), background-color 220ms cubic-bezier(0.22, 1, 0.36, 1), transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .signup-page .input-group[data-field="confirmPassword"] .toggle-secondary-password:hover,
  .signup-page .input-group[data-field="confirmPassword"] .toggle-secondary-password:focus-visible {
    color: #00b894;
    background: rgba(0, 184, 148, 0.08);
    outline: none;
  }

  .signup-page .input-group[data-field="confirmPassword"] .toggle-secondary-password:active {
    transform: translateY(-50%) scale(0.96);
  }

  .signup-page .input-group[data-field="confirmPassword"] .field-meta {
    margin-top: 2px;
    padding-left: 2px;
    color: #8a97a4;
    font-size: 0.78rem;
    line-height: 1.5;
  }

  .signup-page .input-group[data-field="confirmPassword"]:focus-within .toggle-secondary-password {
    color: #00b894;
    background: rgba(0, 184, 148, 0.08);
  }
}

@media (max-width: 767.98px) {

  body.signup-page {
    background:
      radial-gradient(circle at top left, rgba(0, 184, 148, 0.2), transparent 34%),
      radial-gradient(circle at top right, rgba(0, 206, 201, 0.12), transparent 28%),
      linear-gradient(180deg, #f7fbfa 0%, #eef3f6 48%, #f9fbfd 100%);
  }

  .signup-page .auth-side {
    display: none;
  }

  .signup-page .auth-wrapper {
    width: 100%;
    justify-content: center;
  }

  .signup-page .auth-wrapper::before,
  .signup-page .auth-wrapper::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(12px);
  }

  .signup-page .auth-wrapper::before {
    top: -72px;
    left: -38px;
    width: 180px;
    height: 180px;
    background: rgba(0, 184, 148, 0.16);
  }

  .signup-page .auth-wrapper::after {
    right: -62px;
    bottom: 110px;
    width: 220px;
    height: 220px;
    background: rgba(0, 206, 201, 0.12);
  }

  .signup-page .auth-container {
    width: 100%;
    min-height: 100dvh;
    padding: 22px 18px 30px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
  }

  .signup-page .auth-shell {
    max-width: 100%;
  }

  .signup-page .auth-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 268px;
    background:
      radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.26), transparent 20%),
      radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.18), transparent 18%),
      linear-gradient(145deg, #00b894 0%, #12c7b5 52%, #4ed7d1 100%);
    border-bottom-left-radius: 42px;
    border-bottom-right-radius: 42px;
    box-shadow: 0 16px 42px rgba(0, 124, 100, 0.18);
  }

  .signup-page .auth-container::after {
    content: "";
    position: absolute;
    top: 90px;
    right: -34px;
    width: 154px;
    height: 154px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    filter: blur(2px);
  }

  .signup-page .auth-container > * {
    position: relative;
    z-index: 1;
  }

  .signup-page .auth-logo {
    width: 100%;
    margin-top: 4px;
    margin-bottom: 24px;
    justify-content: center;
    color: #ffffff;
    animation: signup-logo-reveal 0.55s ease-out;
  }

  .signup-page .auth-logo img {
    width: 58px;
    height: 58px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
  }

  .signup-page .auth-eyebrow,
  .signup-page .app-name {
    color: #ffffff;
  }

  .signup-page .auth-eyebrow {
    color: rgba(255, 255, 255, 0.82);
  }

  .signup-page .auth-card {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.56);
    box-shadow:
      0 22px 50px rgba(18, 38, 63, 0.12),
      0 8px 18px rgba(18, 38, 63, 0.06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: signup-card-reveal 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .signup-page .auth-card::before {
    height: 168px;
  }

  .signup-page .auth-card-inner {
    padding: 26px 20px 22px;
  }

  .signup-page .auth-header {
    margin-bottom: 18px;
  }

  .signup-page .auth-header h1 {
    font-size: 1.78rem;
  }

  .signup-page .auth-subtitle {
    margin: 10px 0 0;
    color: #617182;
    font-size: 0.93rem;
    line-height: 1.6;
  }

  .signup-page .auth-switch-method {
    gap: 6px;
    margin-bottom: 18px;
    padding: 5px;
    border-radius: 18px;
    background: rgba(9, 30, 66, 0.06);
  }

  .signup-page .auth-switch-method button {
    min-height: 46px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
  }

  .signup-page .auth-form {
    gap: 16px;
  }

  .signup-page .input-group {
    gap: 9px;
  }

  .signup-page .input-group input {
    min-height: 56px;
    font-size: 0.98rem;
    padding-top: 15px;
    padding-bottom: 15px;
  }

  .signup-page .field-meta {
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .signup-page .password-grid {
    display: grid;
    gap: 16px;
  }

  .signup-page #togglePassword,
  .signup-page .toggle-secondary-password {
    right: 8px;
  }

  .signup-page .password-criteria {
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(245, 250, 248, 0.96), rgba(238, 247, 244, 0.98));
    border: 1px solid rgba(0, 184, 148, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }

  .signup-page .criteria-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.84rem;
    font-weight: 800;
    color: #33404d;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .signup-page .pw-strength-track {
    position: relative;
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(20, 33, 43, 0.08);
  }

  .signup-page .pw-strength-bar {
    height: 100%;
    width: 0;
    border-radius: inherit;
    transition: width 220ms ease, background-color 220ms ease;
  }

  .signup-page .pw-strength-bar.weak {
    background: linear-gradient(135deg, #ff7a7a, #ef5350);
  }

  .signup-page .pw-strength-bar.medium {
    background: linear-gradient(135deg, #ffc24d, #f39c12);
  }

  .signup-page .pw-strength-bar.strong {
    background: linear-gradient(135deg, #00b894, #13c9b4);
  }

  .signup-page .pw-strength-label {
    color: #33404d;
    font-size: 0.78rem;
    font-weight: 800;
  }

  .signup-page .criteria-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .signup-page .criteria-item,
  .signup-page .pw-match {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #667482;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.45;
  }

  .signup-page .criteria-item .icon,
  .signup-page .pw-match .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(20, 33, 43, 0.08);
    color: #7a8794;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    flex: 0 0 20px;
  }

  .signup-page .criteria-item.valid,
  .signup-page .pw-match.valid {
    color: #0f7e5c;
  }

  .signup-page .criteria-item.valid .icon,
  .signup-page .pw-match.valid .icon {
    background: rgba(15, 159, 116, 0.14);
    color: #0f9f74;
  }

  .signup-page .criteria-item.invalid,
  .signup-page .pw-match.invalid {
    color: #7a8794;
  }

  .signup-page #signupBtn {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    padding: 14px 18px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #00b894 0%, #10c5af 54%, #36d4c8 100%);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    box-shadow: 0 20px 34px rgba(0, 184, 148, 0.24);
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1), filter 220ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .signup-page #signupBtn::after {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
  }

  .signup-page #signupBtn:hover {
    transform: translateY(-1px);
    filter: saturate(1.03);
    box-shadow: 0 24px 38px rgba(0, 184, 148, 0.3);
  }

  .signup-page #signupBtn:active {
    transform: translateY(1px) scale(0.988);
    box-shadow: 0 12px 24px rgba(0, 184, 148, 0.22);
  }

  .signup-page #signupBtn:disabled {
    cursor: progress;
    opacity: 0.78;
  }

  .signup-page #signupBtn.is-loading .btn-spinner {
    display: inline-block;
  }

  .signup-page .auth-footer {
    margin-top: 22px;
  }

  .signup-page .auth-footer p {
    margin: 0 0 10px;
    font-size: 0.9rem;
  }

  @keyframes signup-logo-reveal {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes signup-card-reveal {
    from {
      opacity: 0;
      transform: translateY(30px) scale(0.98);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}

@media (max-width: 420px) {
  .signup-page .auth-container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .signup-page .auth-card {
    border-radius: 24px;
  }

  .signup-page .auth-card-inner {
    padding: 22px 16px 20px;
  }

  .signup-page .auth-logo {
    margin-bottom: 22px;
    gap: 10px;
  }

  .signup-page .auth-header h1 {
    font-size: 1.58rem;
  }

  .signup-page .field-label {
    font-size: 0.88rem;
  }

  .signup-page .criteria-item,
  .signup-page .pw-match {
    align-items: flex-start;
  }
}