.wg-auth {
    min-height: calc(100vh - 6rem);
    padding: clamp(3rem, 7vw, 6rem) 1rem;
    background:
        radial-gradient(circle at 20% 10%, rgba(139, 92, 246, .16), transparent 34rem),
        #1a1a1a;
    color: #f8fafc;
}

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

.wg-auth__container {
    width: min(72rem, 100%);
    margin: 0 auto;
}

.wg-auth__intro {
    max-width: none;
    margin-bottom: 2rem;
}

.wg-auth__eyebrow {
    margin: 0 0 .5rem;
    color: #a78bfa;
    font: 600 .78rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.wg-auth__intro h1,
.wg-auth__panel h2,
.wg-auth__signed-in h2 {
    margin: 0;
    color: #fff;
}

.wg-auth__intro h1 {
    font-size: clamp(1.4rem, 3.5vw, 2.45rem);
    line-height: 1.08;
}

.wg-auth__intro > p:last-child,
.wg-auth__signed-in > p {
    margin: .9rem 0 0;
    color: #cbd5e1;
}

.wg-auth__grid {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: 1.25rem;
    align-items: start;
}

.wg-auth__panel,
.wg-auth__signed-in {
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid rgba(167, 139, 250, .24);
    border-radius: 1rem;
    background: rgba(15, 15, 15, .82);
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .22);
}

.wg-auth__panel h2 {
    margin-bottom: 1.4rem;
    font-size: 1.05rem;
}

.wg-auth__field {
    margin-bottom: 1rem;
}

.wg-auth__field label {
    display: block;
    margin-bottom: .4rem;
    color: #e2e8f0;
    font-size: .9rem;
    font-weight: 600;
}

.wg-auth__field input {
    width: 100%;
    min-height: 3rem;
    padding: .7rem .8rem;
    border: 1px solid #475569;
    border-radius: .5rem;
    background: #111827;
    color: #fff;
}


.wg-auth__split-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.wg-auth__form-row,
.wg-auth__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.wg-auth__checkbox {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    color: #cbd5e1;
    font-size: .9rem;
}

.wg-auth__checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin-top: .15rem;
    accent-color: #8b5cf6;
}

.wg-auth__terms {
    margin: .2rem 0 1rem;
}

.wg-auth a {
    color: #a9e835;
}

.wg-auth a:hover,
.wg-auth a:focus {
    color: #e9d5ff;
}

.wg-auth__button {
    display: inline-flex;
    min-height: 3rem;
    width: 100%;
    align-items: center;
    justify-content: center;
    margin-top: .3rem;
    padding: .75rem 1rem;
    border: 0;
    border-radius: .55rem;
    background: linear-gradient(90deg, #7c3aed, #db2777);
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.wg-auth__button:disabled {
    cursor: wait;
    opacity: .65;
}

.wg-auth__status {
    min-height: 1.5rem;
    margin: .8rem 0 .35rem;
    color: #86efac;
    font-size: .9rem;
}

.wg-auth__status.is-error {
    color: #fca5a5;
}

.wg-auth__single { max-width: 36rem; }
.wg-admin-auth { min-height: 100dvh; display: grid; align-items: center; padding: clamp(1.5rem, 6vw, 5rem) 1rem; }
.wg-admin-auth .wg-auth__container { width: min(32rem, 100%); }
.wg-admin-auth .wg-auth__panel { background: rgba(15, 15, 15, .96); }
.wg-admin-auth h1 { margin: 0 0 .4rem; color: #fff; font-size: clamp(1.85rem, 7vw, 2.5rem); line-height: 1.15; }
.wg-admin-auth h2 { margin-top: 1.5rem; }
.wg-admin-auth .wg-auth__field label { display: block; margin-bottom: .4rem; color: #e2e8f0; font-size: .9rem; font-weight: 600; }
.wg-auth__notice { max-width: 42rem; margin: 0 0 1rem; padding: .8rem 1rem; border: 1px solid rgba(252,165,165,.35); border-radius: .55rem; background: rgba(127,29,29,.26); color: #fecaca; }
.wg-auth__notice.is-success { border-color: rgba(134,239,172,.35); background: rgba(20,83,45,.3); color: #bbf7d0; }
.wg-auth__honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(1px,1px,1px,1px) !important; white-space: nowrap !important; }
.wg-auth__hint { color: #cbd5e1; font-size: .9rem; }

.wg-auth__signed-in {
    max-width: 42rem;
}

.wg-auth__signed-in .wg-auth__button {
    width: auto;
    min-width: 12rem;
}

.wg-auth__secondary-link {
    padding: .75rem 1rem;
}

.wg-offer-auth[popover] {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 1.5rem;
    border: 0;
    background: rgba(0, 0, 0, .82);
    color: #f8fafc;
    align-items: center;
    justify-content: center;
}

.wg-offer-auth[popover]:popover-open { display: flex; }
.wg-offer-auth:not([hidden]) { display: flex; }

.wg-offer-auth__sheet {
    width: min(34rem, 100%);
    max-height: min(46rem, 90dvh);
    overflow: hidden;
    border: 1px solid rgba(167, 139, 250, .35);
    border-radius: 1rem;
    background: #111;
    box-shadow: 0 2rem 6rem rgba(0, 0, 0, .65);
}

.wg-offer-auth__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    border-bottom: 1px solid rgba(167, 139, 250, .2);
}

.wg-offer-auth__header h2 { margin: 0; color: #fff; font-size: 1.015rem; }
.wg-offer-auth__header p { margin: .6rem 0 0; color: #94a3b8; font-size: .9rem; line-height: 1.5; }
.wg-offer-auth__close { min-height: 2.75rem; padding: .5rem; border: 0; background: transparent; color: #c4b5fd; cursor: pointer; }
.wg-offer-auth__body { max-height: calc(min(46rem, 90dvh) - 9rem); overflow-y: auto; padding: 1.25rem; }
.wg-offer-auth__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: 1.25rem; padding: .25rem; border-radius: .65rem; background: #0a0a0a; }
.wg-offer-auth__tabs button { min-height: 2.75rem; border: 1px solid transparent; border-radius: .5rem; background: transparent; color: #94a3b8; font-weight: 700; cursor: pointer; }
.wg-offer-auth__tabs button[aria-selected="true"] { border-color: rgba(167, 139, 250, .45); background: rgba(124, 58, 237, .18); color: #fff; }
.wg-offer-auth__legal { margin: .75rem 0; font-size: .9rem; }
.wg-offer-auth__legal > a { color: #a9e835; }
.wg-offer-auth .wg-auth__field label { display: block; margin-bottom: .4rem; color: #e2e8f0; font-size: .9rem; font-weight: 600; }


@media (max-width: 760px) {
    .wg-auth__grid,
    .wg-auth__split-fields {
        grid-template-columns: 1fr;
    }

    .wg-auth__form-row,
    .wg-auth__actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .wg-offer-auth[popover] { align-items: flex-end; padding: 0; }
    .wg-offer-auth__sheet { width: 100%; height: 100dvh; max-height: 100dvh; border-width: 1px 0 0; border-radius: 1rem 1rem 0 0; }
    .wg-offer-auth__header { padding: max(1rem, env(safe-area-inset-top)) 1rem 1rem; }
    .wg-offer-auth__body { max-height: calc(100dvh - 8.5rem); padding: 1rem 1rem max(1.5rem, env(safe-area-inset-bottom)); }
}
