/* ==========================================================================
   India Pet Shop — Sign in / Sign up / OTP
   ========================================================================== */

.ips-auth {
    font-family: var(--hm-font);
    color: var(--hm-ink);
    background: var(--hm-cream);
    padding: calc(var(--hm-header-h, 120px) + 32px) 16px 64px;
    display: flex;
    justify-content: center;
}

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

.ips-auth :where(h1, h2, p, ul, fieldset) {
    margin: 0;
}

.ips-auth :where(ul) {
    padding: 0;
    list-style: none;
}

.ips-auth :where(fieldset) {
    border: 0;
    padding: 0;
    min-width: 0;
}

.ips-auth :where(button, input) {
    font-family: inherit;
}

.au-card {
    width: 100%;
    max-width: 920px;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    background: var(--hm-white);
    border: 1px solid var(--hm-line);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(38, 50, 56, 0.12);
}

/* ---------- Brand panel ---------- */

.au-brand {
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 40px 36px;
    background: linear-gradient(160deg, #43a047 0%, var(--hm-primary) 55%, #1b5e20 100%);
    color: var(--hm-white);
    overflow: hidden;
    min-height: 480px;
}

.ips-auth .au-brand h2 {
    color: var(--hm-white);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 22px;
}

.au-brand li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14.5px;
    padding: 8px 0;
    opacity: 0.95;
}

.au-brand li i {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
}

.au-paw {
    position: absolute;
    color: rgba(255, 255, 255, 0.1);
}

.au-paw--1 {
    top: 26px;
    right: 30px;
    font-size: 110px;
    transform: rotate(20deg);
}

.au-paw--2 {
    top: 150px;
    left: 26px;
    font-size: 60px;
    transform: rotate(-25deg);
}

/* ---------- Form side ---------- */

.au-main {
    padding: 44px 44px 32px;
    display: flex;
    flex-direction: column;
}

.au-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 18px;
}

.au-alert i {
    margin-top: 2px;
}

.au-alert--ok {
    background: #e5f7ee;
    color: #0f6b3f;
}

.au-alert--error {
    background: #fdecea;
    color: #8a1c12;
}

.au-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--hm-primary-soft);
    color: var(--hm-primary);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.au-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.au-sub {
    margin-top: 6px !important;
    color: var(--hm-muted);
    font-size: 15px;
    line-height: 1.55;
}

.au-sub strong {
    color: var(--hm-ink);
}

.au-form {
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.au-field {
    display: block;
    margin: 0;
}

.au-field > span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #455a64;
    margin-bottom: 8px;
}

.au-input {
    position: relative;
}

.au-input i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hm-muted);
}

.au-input input {
    width: 100%;
    height: auto;
    border: 1.5px solid var(--hm-line);
    border-radius: 14px;
    padding: 15px 16px 15px 46px;
    font-size: 16px;
    color: var(--hm-ink);
    outline: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.au-input input::placeholder {
    text-transform: none;
    color: #a3adb1;
}

.au-input input:focus {
    border-color: var(--hm-primary);
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.12);
}

.au-error {
    display: block;
    color: #b42318;
    font-size: 12.5px;
    margin-top: 6px;
}

.au-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 16px 20px;
    background: var(--hm-primary);
    color: var(--hm-white);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(46, 125, 50, 0.28);
    transition: background-color 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}

.au-btn:hover {
    background: var(--hm-primary-dark);
}

.au-btn:active {
    transform: scale(0.99);
}

.au-btn.is-busy {
    opacity: 0.7;
    pointer-events: none;
}

.au-btn.is-busy i {
    animation: au-spin 0.8s linear infinite;
}

.au-btn.is-busy i::before {
    content: '\f110';
}

@keyframes au-spin {
    to { transform: rotate(360deg); }
}

.au-hint {
    margin-top: 14px !important;
    font-size: 13px;
    color: var(--hm-muted);
    text-align: center;
}

.au-hint i {
    color: #138a52;
    margin-right: 4px;
}

.au-switch {
    margin-top: auto !important;
    padding-top: 28px;
    text-align: center;
    font-size: 14px;
    color: var(--hm-muted);
}

.au-switch a,
.au-legal a {
    color: var(--hm-primary) !important;
    font-weight: 600;
    text-decoration: none;
}

.au-legal {
    margin-top: 14px !important;
    text-align: center;
    font-size: 12px;
    color: #a3adb1;
}

.au-legal a {
    font-weight: 500;
}

/* ---------- OTP ---------- */

.au-otp {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.au-otp input {
    width: 100%;
    max-width: 56px;
    aspect-ratio: 1 / 1.15;
    height: auto;
    border: 1.5px solid var(--hm-line);
    border-radius: 14px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--hm-ink);
    outline: 0;
    padding: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.au-otp input:focus {
    border-color: var(--hm-primary);
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.12);
}

.au-otp input.is-filled {
    background: #f3faf3;
    border-color: #a5d6a7;
}

.au-otp.is-error {
    animation: au-shake 0.4s ease;
}

.au-otp.is-error input:not(.is-filled) {
    border-color: #d92d20;
}

@keyframes au-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.au-resend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    font-size: 13.5px;
    color: var(--hm-muted);
}

.au-resend form {
    margin: 0;
}

.au-link {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--hm-primary);
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
}

.au-link:disabled {
    color: var(--hm-muted);
    cursor: default;
}

.au-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
    .ips-auth {
        padding: calc(var(--hm-header-h, 100px) + 16px) 14px 40px;
    }

    .au-card {
        grid-template-columns: minmax(0, 1fr);
        border-radius: 22px;
    }

    .au-brand {
        display: none;
    }

    .au-main {
        padding: 30px 22px 24px;
    }

    .au-title {
        font-size: 24px;
    }

    .au-otp {
        gap: 8px;
    }

    .au-otp input {
        font-size: 22px;
        border-radius: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .au-otp.is-error,
    .au-btn.is-busy i {
        animation: none;
    }
}
