/* WalletGateway — mobile-style auth (sign in / register) */

:root {
    --wg-auth-blue: #38bdf8;
    --wg-auth-blue-dark: #0ea5e9;
    --wg-auth-blue-soft: #e0f2fe;
    --wg-auth-admin: #8b5cf6;
    --wg-auth-admin-dark: #7c3aed;
}

.wg-auth-app {
    min-height: 100dvh;
    background: #fff;
    font-family: Inter, system-ui, -apple-system, sans-serif;
}

.wg-auth-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100dvh;
}

/* ── Banner header ── */
.wg-auth-banner {
    position: relative;
    background: linear-gradient(160deg, var(--wg-auth-blue) 0%, var(--wg-auth-blue-dark) 100%);
    color: #fff;
    padding: 1.25rem 1.25rem 4.5rem;
    overflow: hidden;
}

.wg-auth-app--admin .wg-auth-banner {
    background: linear-gradient(160deg, var(--wg-auth-admin) 0%, var(--wg-auth-admin-dark) 100%);
}

.wg-auth-banner__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 28px,
        rgb(255 255 255 / 0.35) 28px,
        rgb(255 255 255 / 0.35) 32px
    );
    pointer-events: none;
}

.wg-auth-banner__top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.wg-auth-banner__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.wg-auth-banner__subtitle {
    display: none;
}

.wg-auth-banner__highlights {
    display: none;
}

.wg-auth-banner__logo {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.625rem;
    background: rgb(255 255 255 / 0.2);
}

.wg-auth-banner__logo svg {
    width: 1.125rem;
    height: 1.125rem;
}

.wg-auth-banner__brand-name {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.wg-auth-banner__alt-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    background: rgb(255 255 255 / 0.18);
    border: 1px solid rgb(255 255 255 / 0.28);
    transition: background 0.15s;
}

.wg-auth-banner__alt-link:hover {
    background: rgb(255 255 255 / 0.28);
}

.wg-auth-banner__title {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: clamp(1.625rem, 5vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
    text-align: center;
    padding: 0 0.5rem 0.5rem;
}

.wg-auth-banner__wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3.5rem;
    color: #fff;
    line-height: 0;
}

.wg-auth-banner__wave svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── Form body ── */
.wg-auth-body {
    position: relative;
    margin-top: -2.25rem;
    background: #fff;
    border-radius: 1.75rem 1.75rem 0 0;
    min-height: 50dvh;
    z-index: 2;
}

.wg-auth-body__inner {
    padding: 0.5rem 1.25rem 2rem;
}

.wg-auth-form-title {
    margin: 0 0 1.25rem;
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.wg-auth-switch {
    margin: 1.25rem 0 0;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
}

.wg-auth-switch a,
.wg-auth-switch button {
    font-weight: 700;
    color: var(--wg-auth-blue-dark) !important;
}

.wg-auth-app--admin .wg-auth-switch a,
.wg-auth-app--admin .wg-auth-switch button {
    color: var(--wg-auth-admin-dark) !important;
}

/* ── Filament form overrides ── */
.wg-auth-body .fi-simple-page {
    gap: 0;
}

.wg-auth-body .fi-simple-header {
    display: none !important;
}

.wg-auth-body .fi-fo-field-wrp {
    margin-bottom: 0.875rem;
}

.wg-auth-body .fi-fo-field-wrp-label {
    display: none;
}

.wg-auth-body .fi-input-wrp {
    border-radius: 9999px !important;
    border: 1.5px solid #e2e8f0 !important;
    background: #fff !important;
    box-shadow: none !important;
    overflow: hidden;
}

.wg-auth-body .fi-input-wrp:focus-within {
    border-color: var(--wg-auth-blue) !important;
    box-shadow: 0 0 0 3px rgb(56 189 248 / 0.2) !important;
}

.wg-auth-app--admin .wg-auth-body .fi-input-wrp:focus-within {
    border-color: var(--wg-auth-admin) !important;
    box-shadow: 0 0 0 3px rgb(139 92 246 / 0.2) !important;
}

.wg-auth-body .fi-input-wrp input,
.wg-auth-body .fi-input-wrp textarea {
    border: none !important;
    box-shadow: none !important;
    padding: 0.8rem 1.125rem !important;
    font-size: 0.9375rem !important;
    background: transparent !important;
}

.wg-auth-body .fi-input-wrp input::placeholder {
    color: #94a3b8;
}

.wg-auth-body .fi-fo-checkbox {
    margin-top: 0.25rem;
}

.wg-auth-body .fi-fo-checkbox label {
    font-size: 0.875rem;
    color: #475569;
}

.wg-auth-body .fi-form-actions {
    margin-top: 1.25rem;
}

.wg-auth-body .fi-btn {
    width: 100%;
    border-radius: 9999px !important;
    padding: 0.8rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    background: linear-gradient(180deg, var(--wg-auth-blue) 0%, var(--wg-auth-blue-dark) 100%) !important;
    border: none !important;
    box-shadow: 0 8px 20px -6px rgb(14 165 233 / 0.55) !important;
}

.wg-auth-app--admin .wg-auth-body .fi-btn {
    background: linear-gradient(180deg, var(--wg-auth-admin) 0%, var(--wg-auth-admin-dark) 100%) !important;
    box-shadow: 0 8px 20px -6px rgb(124 58 237 / 0.45) !important;
}

.wg-auth-body .fi-btn:hover {
    filter: brightness(1.05);
}

.wg-auth-body .fi-link {
    font-weight: 700;
}

/* Legacy blade auth shell */
.wg-auth-shell-legacy {
    min-height: 100dvh;
    background: #fff;
}

.wg-auth-shell-legacy .wg-auth-banner {
    padding-bottom: 4.5rem;
}

.wg-auth-shell-legacy .wg-auth-body {
    margin-top: -2.25rem;
}

.wg-auth-legacy-input {
    width: 100%;
    border-radius: 9999px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    padding: 0.8rem 1.125rem;
    font-size: 0.9375rem;
    color: #0f172a;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.wg-auth-legacy-input:focus {
    border-color: var(--wg-auth-blue);
    box-shadow: 0 0 0 3px rgb(56 189 248 / 0.2);
}

.wg-auth-legacy-btn {
    width: 100%;
    border: none;
    border-radius: 9999px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(180deg, var(--wg-auth-blue) 0%, var(--wg-auth-blue-dark) 100%);
    box-shadow: 0 8px 20px -6px rgb(14 165 233 / 0.55);
}

.wg-auth-legacy-btn:hover {
    filter: brightness(1.05);
}

.wg-auth-legacy-alert {
    margin-bottom: 1rem;
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.wg-auth-legacy-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.wg-auth-legacy-alert--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

/* Pending approval */
.wg-pending-approval {
    max-width: 40rem;
    margin: 0 auto;
    padding: 1.5rem 0 2rem;
}

.wg-pending-approval__card {
    border-radius: 1.25rem;
    border: 1px solid #bae6fd;
    background: linear-gradient(180deg, #f0f9ff, #fff);
    padding: 1.75rem;
}

.wg-pending-approval__steps {
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

.wg-pending-approval__steps li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 0.875rem;
    color: #475569;
}

.wg-pending-approval__steps span {
    display: inline-flex;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    align-items: center;
    justify-content: center;
    background: #e0f2fe;
    color: #0284c7;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Tablet: centered card ── */
@media (min-width: 640px) {
    .wg-auth-app {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 1.5rem 1rem 2rem;
        background: linear-gradient(180deg, var(--wg-auth-blue-soft) 0%, #f0f9ff 40%, #f8fafc 100%);
    }

    .wg-auth-app--admin {
        background: linear-gradient(180deg, #ede9fe 0%, #f5f3ff 40%, #f8fafc 100%);
    }

    .wg-auth-card {
        width: 100%;
        max-width: 28rem;
        min-height: auto;
        border-radius: 1.5rem;
        overflow: hidden;
        box-shadow: 0 25px 50px -12px rgb(14 165 233 / 0.15);
    }

    .wg-auth-app--admin .wg-auth-card {
        box-shadow: 0 25px 50px -12px rgb(124 58 237 / 0.12);
    }

    .wg-auth-body {
        margin-top: -2.5rem;
        border-radius: 0 0 1.5rem 1.5rem;
    }

    .wg-auth-body__inner {
        padding: 0.75rem 1.75rem 2rem;
    }
}

/* ── Desktop: split card layout ── */
@media (min-width: 960px) {
    .wg-auth-app {
        align-items: center;
        justify-content: center;
        padding: 2.5rem 2rem;
        min-height: 100dvh;
    }

    .wg-auth-card {
        display: grid;
        grid-template-columns: 1fr 1fr;
        max-width: 56rem;
        min-height: 36rem;
        border-radius: 1.5rem;
        box-shadow:
            0 4px 6px -1px rgb(15 23 42 / 0.06),
            0 25px 50px -12px rgb(15 23 42 / 0.18);
    }

    .wg-auth-app--admin .wg-auth-card {
        box-shadow:
            0 4px 6px -1px rgb(15 23 42 / 0.06),
            0 25px 50px -12px rgb(124 58 237 / 0.15);
    }

    .wg-auth-banner {
        padding: 2.5rem 2.25rem;
        min-height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .wg-auth-banner__top {
        margin-bottom: 2rem;
    }

    .wg-auth-banner__title {
        text-align: left;
        padding: 0;
        font-size: 1.875rem;
        margin-bottom: 0.75rem;
    }

    .wg-auth-banner__subtitle {
        display: block;
        position: relative;
        z-index: 1;
        margin: 0 0 1.5rem;
        font-size: 0.9375rem;
        line-height: 1.65;
        opacity: 0.92;
        text-align: left;
        max-width: 20rem;
    }

    .wg-auth-banner__highlights {
        display: flex;
        flex-direction: column;
        gap: 0.625rem;
        position: relative;
        z-index: 1;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .wg-auth-banner__highlights li {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.8125rem;
        font-weight: 500;
        opacity: 0.95;
    }

    .wg-auth-banner__highlights svg {
        width: 1rem;
        height: 1rem;
        flex-shrink: 0;
        opacity: 0.9;
    }

    .wg-auth-banner__wave {
        display: none;
    }

    .wg-auth-body {
        margin-top: 0;
        border-radius: 0;
        min-height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        overflow-y: auto;
        max-height: 38rem;
    }

    .wg-auth-body__inner {
        width: 100%;
        max-width: 22rem;
        padding: 2.5rem 2.25rem;
    }

    .wg-auth-form-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .wg-auth-shell-legacy .wg-auth-body {
        margin-top: 0;
    }
}

/* ── Large desktop: more breathing room ── */
@media (min-width: 1200px) {
    .wg-auth-card {
        max-width: 60rem;
        min-height: 38rem;
    }

    .wg-auth-banner {
        padding: 3rem 2.75rem;
    }

    .wg-auth-body__inner {
        max-width: 24rem;
        padding: 3rem 2.75rem;
    }
}
