:root {
    color-scheme: light;
}

body.auth-layout {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    background:
        linear-gradient(90deg, rgba(22, 163, 74, .08), transparent 38%),
        linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
    color: #0f172a;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    overflow-x: hidden;
}

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

.auth-market-page {
    position: relative;
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    flex-direction: column;
    isolation: isolate;
    padding: clamp(14px, 2.2vh, 22px);
}

.auth-market-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        linear-gradient(rgba(15, 23, 42, .032) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, .032) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .82), transparent 78%);
}

.auth-market-orb {
    position: fixed;
    z-index: -1;
    width: 440px;
    height: 440px;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(30px);
    opacity: .18;
}

.auth-market-orb--green {
    top: -160px;
    left: -120px;
    background: #16a34a;
}

.auth-market-orb--blue {
    right: -160px;
    bottom: -180px;
    background: #2563eb;
}

.auth-market-topbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, 100%);
    flex: 0 0 auto;
    min-height: 40px;
    margin: 0 auto clamp(12px, 1.9vh, 18px);
    gap: 16px;
}

.auth-market-brand,
.auth-market-links {
    display: inline-flex;
    align-items: center;
}

.auth-market-brand {
    gap: 10px;
    color: #0f172a;
    text-decoration: none;
}

.auth-market-brand__mark,
.auth-brand-dot {
    display: inline-grid;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient(135deg, #111827, #243041);
    color: #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .18);
}

.auth-market-brand__mark {
    width: 34px;
    height: 34px;
    font-size: 11px;
    font-weight: 900;
}

.auth-market-brand strong {
    display: block;
    font-size: 15px;
    line-height: 1.1;
    font-weight: 850;
}

.auth-market-brand small {
    display: block;
    margin-top: 1px;
    color: #64748b;
    font-size: 11px;
    font-weight: 650;
}

.auth-market-links {
    gap: 6px;
    padding: 4px;
    border: 1px solid #dbe3ec;
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
    backdrop-filter: blur(12px);
}

.auth-market-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    color: #334155;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}

.auth-market-links a:hover {
    color: #0f172a;
    background: #e9f1e8;
}

.auth-market-shell {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(420px, 500px);
    align-items: stretch;
    flex: 1 1 auto;
    width: min(1180px, 100%);
    min-height: 0;
    margin: 0 auto;
    gap: clamp(16px, 2vw, 22px);
}

.auth-market-story,
.auth-panel__inner {
    border: 1px solid #dbe3ec;
    border-radius: 14px;
    background: rgba(255, 255, 255, .84);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .10);
    backdrop-filter: blur(18px);
}

.auth-market-story {
    position: relative;
    display: flex;
    min-height: 0;
    flex-direction: column;
    justify-content: space-between;
    gap: clamp(14px, 2vh, 20px);
    padding: clamp(22px, 3.1vw, 36px);
    overflow: hidden;
}

.auth-market-story::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(22, 163, 74, .10), transparent 42%),
        linear-gradient(315deg, rgba(37, 99, 235, .09), transparent 40%);
}

.auth-story-copy,
.auth-console,
.auth-proof-grid {
    position: relative;
    z-index: 1;
}

.auth-kicker,
.auth-panel__badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    width: max-content;
    border-radius: 999px;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    padding: 0 9px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.auth-story-copy h1 {
    max-width: 620px;
    margin: 12px 0 10px;
    color: #0b1220;
    font-size: clamp(30px, 3.7vw, 46px);
    line-height: 1.04;
    font-weight: 860;
    letter-spacing: 0;
}

.auth-story-copy p {
    max-width: 620px;
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.55;
    font-weight: 560;
}

.auth-console {
    max-width: 660px;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(22, 163, 74, .08), transparent 42%),
        linear-gradient(315deg, rgba(37, 99, 235, .07), transparent 44%),
        rgba(255, 255, 255, .9);
    color: #0f172a;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .09);
}

.auth-console__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border-bottom: 1px solid #dbe3ec;
    background: rgba(248, 250, 252, .78);
}

.auth-console__bar span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.auth-console__bar span:nth-child(1) {
    background: #ef4444;
}

.auth-console__bar span:nth-child(2) {
    background: #f59e0b;
}

.auth-console__bar span:nth-child(3) {
    background: #16a34a;
}

.auth-console__bar strong {
    margin-left: auto;
    color: #475569;
    font-size: 12px;
    font-weight: 850;
}

.auth-console__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
}

.auth-console__metric {
    min-height: 82px;
    padding: 11px;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(22, 163, 74, .13), transparent 50%),
        #fff;
}

.auth-console__metric small,
.auth-console__metric em {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.auth-console__metric strong {
    display: block;
    margin: 6px 0 4px;
    color: #0f172a;
    font-size: 25px;
    line-height: 1;
    font-weight: 900;
}

.auth-console__rows {
    display: grid;
    gap: 7px;
    padding: 0 12px 12px;
}

.auth-console__rows span {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 72px;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 0 9px;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: rgba(255, 255, 255, .86);
}

.auth-console__rows b,
.auth-console__rows i {
    display: block;
    border-radius: 999px;
}

.auth-console__rows b {
    width: 22px;
    height: 22px;
    background: #16a34a;
}

.auth-console__rows i {
    height: 7px;
    background: #cbd5e1;
}

.auth-console__rows i:last-child {
    background: #2563eb;
}

.auth-console__activity,
.auth-proof-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.auth-console__activity {
    padding: 0 12px 12px;
}

.auth-console__activity span,
.auth-proof-grid span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 850;
}

.auth-console__activity span {
    color: #1e3a8a;
    background: #dbeafe;
}

.auth-proof-grid span {
    color: #0f172a;
    border: 1px solid #dbe3ec;
    background: rgba(255, 255, 255, .82);
}

.auth-proof-grid i {
    color: #059669;
}

.auth-panel {
    width: 100%;
}

.auth-panel__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
    padding: clamp(22px, 3.1vw, 34px);
}

.auth-panel__inner::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(90deg, #16a34a, #2563eb, #f59e0b);
}

.auth-panel__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.theme-toggle--auth {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 999px;
    color: #0f172a;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px #dbe3ec;
}

.auth-heading {
    margin-bottom: 18px;
}

.auth-brand-dot {
    width: 38px;
    height: 38px;
    margin-bottom: 10px;
}

.auth-brand-dot::before {
    content: "OM";
    font-size: 11px;
    font-weight: 900;
}

.auth-title {
    margin: 10px 0 7px;
    color: #0b1220;
    font-size: clamp(30px, 3.5vw, 38px);
    line-height: 1.06;
    font-weight: 860;
    letter-spacing: 0;
}

.auth-subtitle {
    max-width: 390px;
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 560;
}

.auth-field {
    display: grid;
    gap: 8px;
    margin-top: 15px;
}

.auth-field label {
    color: #0f172a;
    font-size: 13px;
    font-weight: 850;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap i {
    position: absolute;
    top: 50%;
    left: 14px;
    color: #64748b;
    transform: translateY(-50%);
    pointer-events: none;
}

.auth-input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #dbe3ec;
    border-radius: 9px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 14px;
    font-weight: 650;
    padding: 0 14px 0 42px;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.auth-input:hover {
    border-color: #b8c7d9;
    background: #fff;
}

.auth-input:focus {
    border-color: #16a34a;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, .12);
}

.auth-input::placeholder {
    color: #94a3b8;
    font-weight: 560;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 0 18px;
}

.auth-switch {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #475569;
    font-size: 13px;
    font-weight: 750;
}

.auth-switch label {
    margin: 0;
    cursor: pointer;
}

.auth-switch input[type="checkbox"] {
    display: inline-grid;
    width: 18px;
    height: 18px;
    margin: 0;
    place-content: center;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    appearance: none;
    background: #fff;
    cursor: pointer;
}

.auth-switch input[type="checkbox"]::before {
    content: "";
    width: 10px;
    height: 10px;
    clip-path: polygon(14% 44%, 0 65%, 40% 100%, 100% 18%, 80% 0, 40% 62%);
    background: #fff;
    transform: scale(0);
    transition: transform .12s ease;
}

.auth-switch input[type="checkbox"]:checked {
    border-color: #16a34a;
    background: #16a34a;
}

.auth-switch input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.auth-link {
    color: #15803d;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}

.auth-link:hover {
    color: #166534;
    text-decoration: underline;
}

.auth-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 9px;
    overflow: hidden;
    background: #16a34a;
    color: #fff;
    box-shadow: 0 15px 30px rgba(22, 163, 74, .22);
    font-size: 15px;
    font-weight: 900;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.auth-button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .28), transparent);
    transform: translateX(-140%);
}

.auth-button:hover {
    background: #15803d;
    box-shadow: 0 18px 34px rgba(22, 163, 74, .28);
    transform: translateY(-1px);
}

.auth-button:hover::before {
    animation: authSheen .74s cubic-bezier(.2, .8, .2, 1);
}

.auth-button:active {
    transform: translateY(0) scale(.99);
}

.auth-terms {
    max-width: 390px;
    margin: 12px auto 0;
    color: #64748b;
    text-align: center;
    font-size: 12.5px;
    line-height: 1.55;
    font-weight: 620;
}

.auth-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.auth-meta span {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    border: 1px solid #dbe3ec;
    border-radius: 999px;
    padding: 0 10px;
    color: #475569;
    background: #fff;
    font-size: 11px;
    font-weight: 850;
}

.auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 18px;
    padding: 12px 13px;
    border: 1px solid transparent;
    border-radius: 9px;
}

.auth-alert--success {
    border-color: #bbf7d0;
    background: #ecfdf5;
    color: #065f46;
}

.auth-alert--danger {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.auth-alert__icon {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 8px;
    background: #16a34a;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.auth-alert--danger .auth-alert__icon {
    background: #ef4444;
}

.auth-alert__text {
    color: inherit;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.4;
}

.auth-alert__close {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    opacity: .58;
}

.auth-alert__close:hover {
    opacity: 1;
}

html[data-bs-theme="dark"] body.auth-layout {
    background:
        linear-gradient(120deg, rgba(22, 163, 74, .14), transparent 38%),
        linear-gradient(260deg, rgba(37, 99, 235, .12), transparent 42%),
        #020617;
}

html[data-bs-theme="dark"] .auth-market-brand,
html[data-bs-theme="dark"] .auth-story-copy h1,
html[data-bs-theme="dark"] .auth-title,
html[data-bs-theme="dark"] .auth-field label {
    color: #f8fafc;
}

html[data-bs-theme="dark"] .auth-market-brand small,
html[data-bs-theme="dark"] .auth-story-copy p,
html[data-bs-theme="dark"] .auth-subtitle,
html[data-bs-theme="dark"] .auth-switch,
html[data-bs-theme="dark"] .auth-terms {
    color: #94a3b8;
}

html[data-bs-theme="dark"] .auth-market-story,
html[data-bs-theme="dark"] .auth-panel__inner,
html[data-bs-theme="dark"] .auth-market-links,
html[data-bs-theme="dark"] .theme-toggle--auth,
html[data-bs-theme="dark"] .auth-proof-grid span,
html[data-bs-theme="dark"] .auth-meta span {
    border-color: rgba(148, 163, 184, .18);
    background: rgba(15, 23, 42, .74);
}

html[data-bs-theme="dark"] .auth-console {
    border-color: rgba(148, 163, 184, .24);
    background:
        linear-gradient(135deg, rgba(22, 163, 74, .18), transparent 44%),
        linear-gradient(315deg, rgba(37, 99, 235, .16), transparent 44%),
        rgba(248, 250, 252, .08);
    color: #f8fafc;
    box-shadow: 0 18px 45px rgba(2, 6, 23, .24);
}

html[data-bs-theme="dark"] .auth-console__bar,
html[data-bs-theme="dark"] .auth-console__metric,
html[data-bs-theme="dark"] .auth-console__rows span {
    border-color: rgba(148, 163, 184, .18);
    background: rgba(15, 23, 42, .44);
}

html[data-bs-theme="dark"] .auth-console__bar strong,
html[data-bs-theme="dark"] .auth-console__metric small,
html[data-bs-theme="dark"] .auth-console__metric em {
    color: #cbd5e1;
}

html[data-bs-theme="dark"] .auth-console__metric strong {
    color: #f8fafc;
}

html[data-bs-theme="dark"] .auth-console__rows i {
    background: rgba(148, 163, 184, .38);
}

html[data-bs-theme="dark"] .auth-market-links a,
html[data-bs-theme="dark"] .theme-toggle--auth,
html[data-bs-theme="dark"] .auth-proof-grid span,
html[data-bs-theme="dark"] .auth-meta span {
    color: #e2e8f0;
}

html[data-bs-theme="dark"] .auth-input {
    border-color: rgba(148, 163, 184, .22);
    background: rgba(15, 23, 42, .72);
    color: #f8fafc;
}

html[data-bs-theme="dark"] .auth-input:hover,
html[data-bs-theme="dark"] .auth-input:focus {
    background: rgba(15, 23, 42, .92);
}

html[data-bs-theme="dark"] .auth-switch input[type="checkbox"] {
    border-color: rgba(148, 163, 184, .34);
    background: rgba(15, 23, 42, .92);
}

html[data-bs-theme="dark"] .auth-switch input[type="checkbox"]:checked {
    background: #16a34a;
}

@keyframes authSheen {
    to {
        transform: translateX(140%);
    }
}

@media (min-width: 1061px) and (max-height: 760px) {
    .auth-market-page {
        padding: 12px 18px;
    }

    .auth-market-topbar {
        min-height: 36px;
        margin-bottom: 10px;
    }

    .auth-market-brand__mark {
        width: 30px;
        height: 30px;
    }

    .auth-market-brand strong {
        font-size: 14px;
    }

    .auth-market-brand small {
        font-size: 10px;
    }

    .auth-market-links a {
        min-height: 28px;
        padding: 0 10px;
    }

    .auth-market-shell {
        gap: 14px;
    }

    .auth-market-story,
    .auth-panel__inner {
        border-radius: 12px;
    }

    .auth-market-story {
        gap: 12px;
        padding: 18px 22px;
    }

    .auth-kicker,
    .auth-panel__badge {
        min-height: 22px;
        font-size: 10px;
    }

    .auth-story-copy h1 {
        margin: 9px 0 7px;
        font-size: clamp(28px, 3vw, 38px);
    }

    .auth-story-copy p {
        font-size: 13px;
        line-height: 1.42;
    }

    .auth-console__bar {
        min-height: 34px;
    }

    .auth-console__grid {
        padding: 9px;
    }

    .auth-console__metric {
        min-height: 68px;
        padding: 9px;
    }

    .auth-console__metric strong {
        margin: 4px 0 3px;
        font-size: 22px;
    }

    .auth-console__rows {
        gap: 6px;
        padding: 0 9px 9px;
    }

    .auth-console__rows span {
        min-height: 31px;
    }

    .auth-console__activity {
        padding: 0 9px 9px;
    }

    .auth-console__activity span,
    .auth-proof-grid span {
        min-height: 28px;
        font-size: 11px;
    }

    .auth-panel__inner {
        padding: 18px 22px;
    }

    .auth-panel__toolbar {
        margin-bottom: 12px;
    }

    .theme-toggle--auth {
        width: 36px;
        height: 36px;
    }

    .auth-heading {
        margin-bottom: 12px;
    }

    .auth-brand-dot {
        width: 32px;
        height: 32px;
        margin-bottom: 8px;
    }

    .auth-title {
        margin: 8px 0 5px;
        font-size: 30px;
    }

    .auth-subtitle {
        font-size: 13px;
        line-height: 1.42;
    }

    .auth-field {
        gap: 6px;
        margin-top: 12px;
    }

    .auth-field label,
    .auth-switch,
    .auth-link {
        font-size: 12px;
    }

    .auth-input {
        min-height: 44px;
    }

    .auth-row {
        margin: 12px 0 14px;
    }

    .auth-button {
        min-height: 46px;
    }

    .auth-terms {
        margin-top: 9px;
        font-size: 11.5px;
        line-height: 1.4;
    }

    .auth-meta {
        margin-top: 12px;
    }

    .auth-meta span {
        min-height: 25px;
        font-size: 10px;
    }
}

@media (max-width: 1060px) {
    .auth-market-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-market-story {
        min-height: 480px;
    }

    .auth-panel__inner {
        min-height: auto;
    }
}

@media (max-width: 720px) {
    .auth-market-page {
        padding: 16px;
    }

    .auth-market-topbar {
        align-items: flex-start;
        margin-bottom: 16px;
    }

    .auth-market-brand small,
    .auth-market-links {
        display: none;
    }

    .auth-market-story {
        order: 2;
        min-height: auto;
        padding: 22px;
        max-width: 100%;
        overflow: hidden;
    }

    .auth-panel {
        order: 1;
    }

    .auth-story-copy h1 {
        font-size: clamp(28px, 10vw, 40px);
    }

    .auth-story-copy p,
    .auth-subtitle,
    .auth-terms {
        overflow-wrap: break-word;
    }

    .auth-console {
        width: 100%;
        max-width: 100%;
    }

    .auth-console__grid {
        grid-template-columns: 1fr;
    }

    .auth-console__rows span {
        grid-template-columns: 28px minmax(0, 1fr);
    }

    .auth-console__rows i:last-child {
        display: none;
    }

    .auth-panel__inner {
        padding: 24px 18px;
        max-width: 100%;
    }

    .auth-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-layout .aibot-launcher {
        position: static !important;
        inset: auto !important;
        display: flex !important;
        width: min(360px, calc(100% - 32px)) !important;
        min-width: 0 !important;
        height: 48px !important;
        margin: 16px auto 0 !important;
        padding: 0 16px !important;
        justify-content: center !important;
        border-radius: 9px !important;
        font-size: 0 !important;
        transform: none !important;
        box-shadow: 0 12px 28px rgba(15, 23, 42, .16) !important;
    }

    .auth-layout .aibot-launcher::before {
        content: "Chat with AI";
        font-size: 14px;
        font-weight: 900;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-market-page *,
    .auth-market-page *::before,
    .auth-market-page *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .001ms !important;
    }
}
