/* ============================================================
   Aira Job Work — auth theme
   Base color: #263238  |  No Bootstrap dependency
   ============================================================ */

:root {
    --auth-page: #1A2226;
    --auth-page-2: #151C20;
    --auth-card: #263238;
    --auth-input: #1E282C;
    --auth-border: #37474F;
    --auth-border-field: #455A64;
    --auth-accent: #4FC3F7;
    --auth-accent-hover: #29B6F6;
    --auth-on-accent: #0D2A36;
    --auth-text: #ECEFF1;
    --auth-text-2: #90A4AE;
    --auth-text-3: #78909C;
    --auth-text-4: #607D8B;
    --auth-label: #B0BEC5;
    --auth-icon-bg: #37474F;
    --auth-warn-bg: #3E2723;
    --auth-warn-border: #6D4C41;
    --auth-warn-text: #FFCC80;
    --auth-warn-icon: #FFB74D;
    --auth-radius: 8px;
}

/* ---------- reset ---------- */

*, *::before, *::after {
    box-sizing: border-box;
}

html, body.auth-body {
    height: 100%;
}

body.auth-body {
    margin: 0;
    background: var(--auth-page);
    color: var(--auth-text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

.auth-body p {
    margin: 0;
}

.auth-body button {
    font: inherit;
    color: inherit;
}

/* the only Bootstrap class the JS relies on */
.d-none {
    display: none !important;
}

/* ---------- ambient background ---------- */

.auth-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 0%, #222E34 0%, var(--auth-page) 45%, var(--auth-page-2) 100%);
}

.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .16;
}

.auth-orb--1 {
    width: 460px;
    height: 460px;
    top: -140px;
    left: -100px;
    background: #4FC3F7;
    animation: authFloat1 18s ease-in-out infinite;
}

.auth-orb--2 {
    width: 400px;
    height: 400px;
    bottom: -160px;
    right: -120px;
    background: #26A69A;
    animation: authFloat2 22s ease-in-out infinite;
}

@keyframes authFloat1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(60px, 50px) scale(1.08);
    }
}

@keyframes authFloat2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-50px, -40px) scale(1.1);
    }
}

.auth-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(144, 164, 174, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(144, 164, 174, .045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at 50% 45%, #000 0%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 0%, transparent 72%);
}

/* ---------- shell ---------- */

.auth-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 384px;
    background: rgba(38, 50, 56, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    padding: 28px 26px 24px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .38);
    animation: authCardIn .5s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes authCardIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-anim {
    animation: authFadeUp .45s cubic-bezier(.22, 1, .36, 1) both;
    animation-delay: calc(220ms + var(--d, 0ms));
}

@keyframes authFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- lucide icon sizing ---------- */

.auth-body [data-lucide],
.auth-body svg.lucide {
    width: 17px;
    height: 17px;
    stroke-width: 1.75;
    flex: 0 0 auto;
}

/* ---------- brand ---------- */

.auth-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 22px;
}

.auth-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: linear-gradient(145deg, #37474F, #2B383E);
    border: 1px solid rgba(79, 195, 247, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-accent);
    flex: 0 0 auto;
}

    .auth-brand-mark svg {
        width: 19px;
        height: 19px;
    }

.auth-brand-name {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--auth-text);
}

.auth-brand-sub {
    font-size: 11.5px;
    color: var(--auth-text-3);
}

/* ---------- headings ---------- */

.auth-title {
    margin-bottom: 4px;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -.015em;
    color: var(--auth-text);
}

.auth-subtitle {
    margin-bottom: 22px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--auth-text-2);
}

    .auth-subtitle strong {
        font-weight: 400;
        color: var(--auth-label);
    }

/* ---------- fields ---------- */

.auth-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--auth-label);
}

.auth-field {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 42px;
    padding: 0 11px;
    margin-bottom: 16px;
    background: var(--auth-input);
    border: 1px solid var(--auth-border-field);
    border-radius: var(--auth-radius);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

    .auth-field:hover {
        border-color: #546E7A;
    }

    .auth-field:focus-within {
        border-color: var(--auth-accent);
        background: #1C272B;
        box-shadow: 0 0 0 3px rgba(79, 195, 247, .13);
    }

    .auth-field > svg,
    .auth-field > [data-lucide] {
        color: var(--auth-text-3);
        transition: color .18s ease;
    }

    .auth-field:focus-within > svg:first-child {
        color: var(--auth-accent);
    }

    .auth-field input {
        flex: 1;
        min-width: 0;
        height: 100%;
        background: transparent;
        border: 0;
        outline: 0;
        font-family: inherit;
        font-size: 14px;
        font-weight: 400;
        color: var(--auth-text);
    }

        .auth-field input::placeholder {
            color: var(--auth-text-4);
        }

        /* kill Chrome's yellow autofill wash */
        .auth-field input:-webkit-autofill,
        .auth-field input:-webkit-autofill:hover,
        .auth-field input:-webkit-autofill:focus {
            -webkit-text-fill-color: var(--auth-text);
            -webkit-box-shadow: 0 0 0 1000px var(--auth-input) inset;
            transition: background-color 9999s ease-out 0s;
            caret-color: var(--auth-text);
        }

        /* hide Edge/IE native reveal + clear buttons */
        .auth-field input::-ms-reveal,
        .auth-field input::-ms-clear {
            display: none;
        }

        .auth-field input.auth-password[type="password"] {
            letter-spacing: 2px;
        }

            .auth-field input.auth-password[type="password"]::placeholder {
                letter-spacing: normal;
            }

/* eye toggle */
.auth-toggle {
    cursor: pointer;
    color: var(--auth-text-3);
    display: flex;
    align-items: center;
    transition: color .18s ease;
}

    .auth-toggle:hover {
        color: var(--auth-accent);
    }

    .auth-toggle:focus-visible {
        outline: 2px solid var(--auth-accent);
        outline-offset: 3px;
        border-radius: 4px;
    }

/* ============================================================
   OTP STEP
   ============================================================ */

/* Back link — a <button>, so it needs the anchor look stripped */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 0;
    background: transparent;
    border: 0;
    font-size: 12.5px;
    color: var(--auth-text-2);
    cursor: pointer;
    transition: color .18s ease;
}

    .auth-back:hover {
        color: var(--auth-text);
    }

        .auth-back:hover svg {
            transform: translateX(-2px);
        }

    .auth-back svg {
        width: 16px;
        height: 16px;
        transition: transform .18s ease;
    }

.auth-shield {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: rgba(79, 195, 247, .1);
    border: 1px solid rgba(79, 195, 247, .22);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--auth-accent);
    animation: authPulse 2.4s ease-in-out infinite;
}

    .auth-shield svg {
        width: 21px;
        height: 21px;
    }

@keyframes authPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(79, 195, 247, .22);
    }

    60% {
        box-shadow: 0 0 0 9px rgba(79, 195, 247, 0);
    }
}

/* ---------- the six boxes ---------- */

.auth-otp {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

    .auth-otp input {
        flex: 1;
        width: 100%;
        min-width: 0;
        height: 52px;
        padding: 0;
        text-align: center;
        background: var(--auth-input);
        border: 1px solid var(--auth-border-field);
        border-radius: var(--auth-radius);
        color: var(--auth-text);
        font-family: inherit;
        font-size: 20px;
        font-weight: 600;
        outline: 0;
        caret-color: var(--auth-accent);
        transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .12s ease;
    }

        .auth-otp input:hover:not(:disabled) {
            border-color: #546E7A;
        }

        .auth-otp input:focus {
            border-color: var(--auth-accent);
            background: #1C272B;
            box-shadow: 0 0 0 3px rgba(79, 195, 247, .13);
        }

        /* a filled box reads as "done" without shouting */
        .auth-otp input.filled {
            border-color: #546E7A;
            background: #222E33;
        }

        .auth-otp input:disabled {
            opacity: .45;
            cursor: not-allowed;
        }

    /* shake on a rejected code */
    .auth-otp.shake {
        animation: authShake .4s cubic-bezier(.36, .07, .19, .97);
    }

@keyframes authShake {
    10%, 90% {
        transform: translateX(-1px);
    }

    20%, 80% {
        transform: translateX(2px);
    }

    30%, 50%, 70% {
        transform: translateX(-4px);
    }

    40%, 60% {
        transform: translateX(4px);
    }
}

/* ---------- timer / resend row ---------- */

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.auth-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--auth-text-2);
}

    .auth-meta svg {
        width: 15px;
        height: 15px;
    }

.auth-linkbtn {
    padding: 0;
    background: transparent;
    border: 0;
    font-size: 12px;
    color: var(--auth-accent);
    cursor: pointer;
    transition: color .18s ease;
}

    .auth-linkbtn:hover:not(:disabled) {
        text-decoration: underline;
    }

    .auth-linkbtn:disabled,
    .auth-linkbtn.is-muted {
        color: var(--auth-text-4);
        cursor: default;
        text-decoration: none;
    }

/* ---------- buttons ---------- */

.auth-btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 42px;
    margin-top: 6px;
    border: 0;
    border-radius: var(--auth-radius);
    background: var(--auth-accent);
    color: var(--auth-on-accent);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -.005em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background .18s ease, transform .1s ease, opacity .18s ease, box-shadow .18s ease;
}

    .auth-btn:hover:not(:disabled) {
        background: var(--auth-accent-hover);
        box-shadow: 0 5px 18px rgba(79, 195, 247, .26);
    }

    .auth-btn:active:not(:disabled) {
        transform: translateY(1px);
    }

    .auth-btn::after {
        content: '';
        position: absolute;
        top: 0;
        left: -60%;
        width: 45%;
        height: 100%;
        background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent);
        transform: skewX(-20deg);
        transition: left .55s ease;
    }

    .auth-btn:hover:not(:disabled)::after {
        left: 130%;
    }

    .auth-btn:disabled {
        opacity: .6;
        cursor: not-allowed;
    }

        .auth-btn:disabled::after {
            display: none;
        }

    .auth-btn svg {
        width: 17px;
        height: 17px;
    }

/* spinner shown while a request is in flight */
.auth-spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(13, 42, 54, .3);
    border-top-color: var(--auth-on-accent);
    border-radius: 50%;
    animation: authSpin .7s linear infinite;
}

@keyframes authSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- alert ---------- */

.auth-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 9px 11px;
    background: var(--auth-warn-bg);
    border: 1px solid var(--auth-warn-border);
    border-radius: var(--auth-radius);
    font-size: 12px;
    color: var(--auth-warn-text);
    animation: authFadeUp .25s ease both;
}

    .auth-alert svg {
        width: 16px;
        height: 16px;
        color: var(--auth-warn-icon);
        flex: 0 0 auto;
    }

/* ---------- footer ---------- */

.auth-foot {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(69, 90, 100, .35);
    font-size: 11px;
    color: var(--auth-text-4);
    text-align: center;
}

    .auth-foot span {
        color: var(--auth-text-2);
        font-weight: 500;
    }

/* ---------- notyf ---------- */

.notyf__toast {
    border-radius: var(--auth-radius);
    box-shadow: 0 8px 26px rgba(0, 0, 0, .4);
}

.notyf__wrapper {
    padding: 10px 14px;
}

.notyf__message {
    font-size: 13px;
}

/* ---------- sweetalert ---------- */

.swal2-popup {
    background: var(--auth-card) !important;
    color: var(--auth-text) !important;
    border: 1px solid var(--auth-border);
    border-radius: 14px !important;
}

.swal2-title {
    color: var(--auth-text) !important;
    font-size: 19px !important;
    font-weight: 600 !important;
}

.swal2-html-container {
    color: var(--auth-text-2) !important;
    font-size: 13px !important;
}

.swal2-confirm.swal2-styled {
    background: var(--auth-accent) !important;
    color: var(--auth-on-accent) !important;
    border-radius: var(--auth-radius) !important;
    font-weight: 600;
    box-shadow: none !important;
}

.swal2-cancel.swal2-styled {
    background: transparent !important;
    color: var(--auth-text-2) !important;
    border: 1px solid var(--auth-border-field) !important;
    border-radius: var(--auth-radius) !important;
    box-shadow: none !important;
}

/* ---------- accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 420px) {
    .auth-card {
        padding: 24px 20px 20px;
    }

    .auth-otp {
        gap: 6px;
    }

        .auth-otp input {
            height: 48px;
            font-size: 18px;
        }
}
