/* ==========================================================================
   AiByCode Mailer — Auth (login / OTP) screen
   ========================================================================== */

.auth {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
}

/* ---------- Left: brand showcase ----------------------------------------- */

.auth-aside {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 48px;
    color: #eaf2ff;
    background: linear-gradient(150deg, #05122e 0%, #071a45 38%, #0a2f7a 78%, #1568fc 130%);
    isolation: isolate;
}

/* aurora blobs */
.auth-aside::before,
.auth-aside::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    z-index: -1;
}
.auth-aside::before {
    width: 520px; height: 520px;
    top: -160px; left: -140px;
    background: radial-gradient(circle, rgba(46,240,250,.42), transparent 68%);
    animation: drift 18s var(--ease) infinite alternate;
}
.auth-aside::after {
    width: 460px; height: 460px;
    bottom: -150px; right: -120px;
    background: radial-gradient(circle, rgba(21,69,253,.55), transparent 68%);
    animation: drift 22s var(--ease) infinite alternate-reverse;
}
@keyframes drift {
    from { transform: translate3d(0,0,0) scale(1); }
    to   { transform: translate3d(46px, 34px, 0) scale(1.14); }
}

/* subtle grid overlay */
.auth-grid-lines {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 20%, transparent 78%);
}

.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .mark {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 11px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(8px);
}
.auth-brand .mark img { width: 24px; height: 24px; object-fit: contain; }
.auth-brand .name { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.auth-brand .by { font-size: 11.5px; color: rgba(234,242,255,.6); }

.auth-pitch { max-width: 460px; margin: 40px 0; }
.auth-pitch h1 {
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.12;
}
.auth-pitch h1 em {
    font-style: normal;
    background: linear-gradient(100deg, #2ef0fa, #8fc0ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.auth-pitch p {
    margin-top: 14px;
    font-size: 14.5px;
    line-height: 1.65;
    color: rgba(234,242,255,.72);
}

.auth-features { display: grid; gap: 13px; margin-top: 30px; }
.auth-feature { display: flex; align-items: flex-start; gap: 12px; }
.auth-feature .fi {
    width: 30px; height: 30px;
    flex: none;
    display: grid; place-items: center;
    border-radius: 9px;
    background: rgba(46,240,250,.14);
    border: 1px solid rgba(46,240,250,.24);
    color: #7ff0fb;
}
.auth-feature .fi svg { width: 15px; height: 15px; stroke-width: 1.9; }
.auth-feature .ft { font-size: 13.5px; font-weight: 600; }
.auth-feature .fd { font-size: 12.5px; color: rgba(234,242,255,.62); line-height: 1.5; }

.auth-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(234,242,255,.52);
}
.auth-foot a { color: rgba(234,242,255,.82); font-weight: 600; }

/* ---------- Right: form -------------------------------------------------- */

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--canvas);
    background-image: var(--canvas-tint);
    position: relative;
}

.auth-topright {
    position: absolute;
    top: 20px; right: 22px;
    display: flex;
    gap: 8px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    animation: auth-in .5s var(--ease) both;
}
@keyframes auth-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.auth-card .mobile-brand { display: none; }

.auth-step-ico {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border-radius: var(--r-md);
    background: var(--brand-soft);
    border: 1px solid var(--brand-soft-2);
    color: var(--brand-text);
    margin-bottom: 18px;
}
.auth-step-ico svg { width: 21px; height: 21px; stroke-width: 1.8; }

.auth-card h2 { font-size: 23px; letter-spacing: -.03em; }
.auth-card .lede {
    font-size: 13.5px;
    color: var(--text-2);
    margin-top: 7px;
    line-height: 1.6;
}
.auth-card .lede strong { color: var(--text); font-weight: 650; }

.auth-form { margin-top: 26px; }

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 13px;
    border-radius: var(--r-sm);
    font-size: 12.5px;
    line-height: 1.5;
    margin-bottom: 18px;
    border: 1px solid transparent;
    animation: rise .3s var(--ease) both;
}
.alert svg { width: 15px; height: 15px; flex: none; margin-top: 1px; stroke-width: 2; }
.alert-error   { background: var(--danger-soft);  color: var(--danger);  border-color: var(--danger-line); }
.alert-success { background: var(--success-soft); color: var(--success); border-color: var(--success-line); }

/* OTP boxes */
.otp {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 9px;
    margin-bottom: 20px;
}
.otp input {
    width: 100%;
    height: 56px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 21px;
    font-weight: 600;
    color: var(--text);
    background: var(--surface-inset);
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    caret-color: var(--brand);
    transition: all var(--fast);
}
.otp input:hover { border-color: var(--border-2); }
.otp input:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--ring);
    transform: translateY(-1px);
}
.otp input.filled { border-color: var(--brand-soft-2); background: var(--brand-soft); }

.auth-alt {
    text-align: center;
    margin-top: 18px;
    font-size: 12.5px;
    color: var(--text-3);
}
.auth-alt a { font-weight: 600; }

.auth-legal {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 11.5px;
    color: var(--text-3);
    line-height: 1.6;
}

/* ---------- Responsive ---------------------------------------------------- */

@media (max-width: 940px) {
    .auth { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-main { min-height: 100vh; }
    .auth-card .mobile-brand {
        display: flex;
        align-items: center;
        gap: 11px;
        margin-bottom: 26px;
    }
    .auth-card .mobile-brand .mark {
        width: 40px; height: 40px;
        display: grid; place-items: center;
        border-radius: 11px;
        background: var(--brand-glow);
        border: 1px solid var(--border);
        box-shadow: var(--logo-halo);
    }
    .auth-card .mobile-brand .mark img { width: 24px; height: 24px; object-fit: contain; }
    .auth-card .mobile-brand .name { font-size: 15.5px; font-weight: 700; letter-spacing: -.02em; }
    .auth-card .mobile-brand .by { font-size: 11.5px; color: var(--text-3); }
}

@media (max-width: 420px) {
    .otp { gap: 6px; }
    .otp input { height: 50px; font-size: 18px; }
}
