:root {
    --bg: #07070d;
    --panel: rgba(13, 13, 21, 0.82);
    --panel-strong: rgba(18, 18, 29, 0.94);
    --text: #fff7ff;
    --muted: #c7c0d1;
    --subtle: #91899e;
    --line: rgba(255, 255, 255, 0.13);
    --pink: #ff38be;
    --pink-hot: #ff0aa7;
    --cyan: #56e9ff;
    --mint: #65f2b8;
    --danger: #ff7d9d;
    --shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
}

body,
button,
input {
    font: inherit;
}

a {
    color: inherit;
}

button {
    cursor: pointer;
}

.landing-body {
    min-height: 100vh;
    overflow-x: hidden;
}

.intro-loader {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: grid;
    place-items: center;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 56, 190, 0.18), transparent 24rem),
        radial-gradient(circle at 54% 58%, rgba(86, 233, 255, 0.12), transparent 22rem),
        #07070d;
    animation: introOverlay 2.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.intro-loader-inner {
    position: absolute;
    width: min(680px, 86vw);
    aspect-ratio: 3 / 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(8px, 1.6vw, 14px);
    transform: perspective(900px) rotateX(58deg) rotateZ(-8deg);
}

.intro-loader-inner span {
    --tx: 0px;
    --ty: -40px;
    min-width: 0;
    min-height: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 56, 190, 0.28), rgba(86, 233, 255, 0.12)),
        rgba(255, 255, 255, 0.04);
    box-shadow:
        0 0 18px rgba(255, 56, 190, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    opacity: 0;
    animation: introTile 2.18s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(var(--i) * 38ms);
}

.intro-loader-inner span:nth-child(1) { --tx: -78px; --ty: -54px; }
.intro-loader-inner span:nth-child(2) { --tx: -34px; --ty: -70px; }
.intro-loader-inner span:nth-child(3) { --tx: 34px; --ty: -70px; }
.intro-loader-inner span:nth-child(4) { --tx: 78px; --ty: -54px; }
.intro-loader-inner span:nth-child(5) { --tx: -92px; --ty: 0px; }
.intro-loader-inner span:nth-child(6) { --tx: -28px; --ty: -18px; }
.intro-loader-inner span:nth-child(7) { --tx: 28px; --ty: -18px; }
.intro-loader-inner span:nth-child(8) { --tx: 92px; --ty: 0px; }
.intro-loader-inner span:nth-child(9) { --tx: -78px; --ty: 54px; }
.intro-loader-inner span:nth-child(10) { --tx: -34px; --ty: 70px; }
.intro-loader-inner span:nth-child(11) { --tx: 34px; --ty: 70px; }
.intro-loader-inner span:nth-child(12) { --tx: 78px; --ty: 54px; }

.intro-loader-word {
    position: relative;
    z-index: 1;
    color: #fffaff;
    font-size: clamp(1rem, 3vw, 1.65rem);
    font-weight: 950;
    letter-spacing: 0.22em;
    text-shadow:
        0 0 18px rgba(255, 56, 190, 0.7),
        0 0 28px rgba(86, 233, 255, 0.36);
    animation: introWord 2.2s ease forwards;
}

.success-toast {
    position: fixed;
    top: clamp(14px, 3vw, 28px);
    right: clamp(14px, 3vw, 28px);
    z-index: 90;
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    width: min(360px, calc(100% - 28px));
    min-height: 56px;
    border: 1px solid rgba(101, 242, 184, 0.34);
    border-radius: 8px;
    padding: 12px 14px;
    color: #effff7;
    background:
        linear-gradient(135deg, rgba(101, 242, 184, 0.16), rgba(86, 233, 255, 0.08)),
        rgba(11, 15, 18, 0.9);
    box-shadow:
        0 18px 54px rgba(0, 0, 0, 0.36),
        0 0 28px rgba(101, 242, 184, 0.1);
    backdrop-filter: blur(18px);
    pointer-events: none;
    animation: successToast 4.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.success-toast span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--mint);
    box-shadow: 0 0 18px rgba(101, 242, 184, 0.74);
    animation: successPulse 1200ms ease-in-out infinite;
}

.success-toast strong {
    min-width: 0;
    font-size: 0.92rem;
    line-height: 1.35;
}

.landing-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 24%, rgba(255, 56, 190, 0.22), transparent 30rem),
        radial-gradient(circle at 86% 30%, rgba(86, 233, 255, 0.16), transparent 32rem),
        radial-gradient(circle at 52% 86%, rgba(255, 56, 190, 0.09), transparent 30rem),
        #07070d;
}

.landing-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, 0.8), transparent 90%);
}

.hero-section {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(18px, 4vw, 54px);
}

.hero-shell {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 420px);
    gap: clamp(26px, 5vw, 68px);
    align-items: center;
}

.hero-copy,
.signup-panel {
    animation: smoothIn 560ms ease both;
}

.signup-panel {
    animation-delay: 80ms;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0 0 clamp(24px, 5vh, 42px);
    text-decoration: none;
    filter: drop-shadow(0 12px 34px rgba(255, 56, 190, 0.32));
}

.brand-lockup img,
.admin-brand img {
    display: block;
    width: min(340px, 74vw);
    height: auto;
}

.eyebrow,
.panel-kicker {
    margin: 0 0 12px;
    color: var(--mint);
    font-size: 0.76rem;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

.hero-copy h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(2.8rem, 6.4vw, 5.7rem);
    line-height: 0.96;
    letter-spacing: 0;
}

.lead {
    max-width: 610px;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.35vw, 1.16rem);
    line-height: 1.65;
}

.signup-panel,
.admin-login,
.admin-table-shell {
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
        var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.signup-panel {
    position: relative;
    overflow: hidden;
    padding: clamp(22px, 3vw, 32px);
}

.signup-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, var(--pink), var(--cyan), var(--mint));
}

.signup-panel h2 {
    margin: 0;
    font-size: clamp(1.55rem, 2.7vw, 2.18rem);
    line-height: 1.08;
}

.panel-copy {
    margin: 11px 0 20px;
    color: var(--muted);
    line-height: 1.52;
}

.signup-form,
.admin-login-form {
    display: grid;
    gap: 10px;
}

label,
.search-box span {
    color: #fffaff;
    font-size: 0.84rem;
    font-weight: 850;
}

input {
    width: 100%;
    min-height: 51px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 0 14px;
    color: var(--text);
    background: rgba(4, 5, 11, 0.46);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder {
    color: #837a91;
}

input:focus {
    border-color: rgba(86, 233, 255, 0.72);
    background: rgba(8, 9, 17, 0.76);
    box-shadow: 0 0 0 4px rgba(86, 233, 255, 0.11);
}

button {
    min-height: 52px;
    border: 0;
    border-radius: 8px;
    padding: 0 18px;
    color: #07070d;
    background: linear-gradient(90deg, var(--pink), #ff79d9 52%, var(--cyan));
    box-shadow: 0 18px 44px rgba(255, 56, 190, 0.22);
    font-weight: 950;
    transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

button:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 22px 52px rgba(86, 233, 255, 0.18);
}

.legal-note {
    margin: 0;
    color: var(--subtle);
    font-size: 0.74rem;
    line-height: 1.42;
}

.legal-note a {
    color: #ffffff;
    font-weight: 850;
    text-decoration-color: rgba(86, 233, 255, 0.74);
    text-underline-offset: 3px;
}

.notice {
    margin: 0 0 14px;
    border: 1px solid rgba(101, 242, 184, 0.34);
    border-radius: 8px;
    padding: 12px 13px;
    color: #e0ffef;
    background: rgba(101, 242, 184, 0.09);
    font-size: 0.9rem;
    font-weight: 800;
}

.notice-error {
    border-color: rgba(255, 125, 157, 0.42);
    color: #ffe3ea;
    background: rgba(255, 125, 157, 0.1);
}

.modal-open {
    overflow: hidden;
}

.privacy-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: clamp(14px, 3vw, 34px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.privacy-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.privacy-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 3, 8, 0.78);
    backdrop-filter: blur(14px);
}

.privacy-dialog {
    position: relative;
    width: min(820px, 100%);
    max-height: min(82vh, 780px);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: clamp(20px, 3vw, 34px);
    color: #f2eef8;
    background: var(--panel-strong);
    box-shadow: 0 28px 100px rgba(0, 0, 0, 0.58);
    outline: none;
    transform: translateY(12px) scale(0.98);
    transition: transform 180ms ease;
}

.privacy-modal.is-open .privacy-dialog {
    transform: translateY(0) scale(1);
}

.privacy-close {
    position: sticky;
    top: 0;
    float: right;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    min-height: 42px;
    margin: -6px -6px 10px 16px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
    font-size: 1.6rem;
    line-height: 1;
}

.privacy-close:hover {
    color: #07070d;
}

.privacy-dialog h2 {
    margin: 0 0 18px;
    font-size: clamp(1.8rem, 4vw, 3.1rem);
    line-height: 1;
}

.privacy-content {
    display: grid;
    gap: 12px;
    clear: both;
    color: var(--muted);
    line-height: 1.65;
}

.privacy-content h3 {
    margin: 14px 0 0;
    color: #ffffff;
    font-size: 1.05rem;
}

.privacy-content p {
    margin: 0;
}

.privacy-content ul {
    margin: 0;
    padding-left: 1.2rem;
}

.privacy-content li {
    margin: 0.28rem 0;
}

.admin-body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 56, 190, 0.2), transparent 26rem),
        radial-gradient(circle at 88% 10%, rgba(86, 233, 255, 0.13), transparent 30rem),
        var(--bg);
}

.admin-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.admin-brand img {
    width: min(240px, 54vw);
}

.logout-form button {
    min-height: 42px;
    padding: 0 14px;
}

.admin-login {
    width: min(460px, 100%);
    margin: 8vh auto 0;
    padding: clamp(22px, 4vw, 34px);
}

.admin-login h1,
.admin-heading h1 {
    margin: 0 0 20px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
}

.admin-table-shell {
    padding: clamp(18px, 3vw, 28px);
}

.admin-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.admin-stats {
    display: grid;
    place-items: center;
    min-width: 94px;
    min-height: 72px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.admin-stats span {
    font-size: 2rem;
    font-weight: 950;
}

.admin-stats small {
    color: var(--muted);
    font-weight: 800;
}

.search-box {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.signup-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    color: #ecefff;
    font-size: 0.9rem;
}

.signup-table th,
.signup-table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.signup-table th {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.signup-table tr:last-child td {
    border-bottom: 0;
}

.user-agent {
    max-width: 300px;
    color: var(--muted);
}

.empty-row {
    color: var(--muted);
    text-align: center;
}

@keyframes smoothIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes introOverlay {
    0%,
    72% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes introTile {
    0% {
        opacity: 0;
        transform: translate3d(0, 22px, 0) scale(0.86);
    }
    22% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
    52% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--tx), var(--ty), 0) scale(0.92);
    }
}

@keyframes introWord {
    0% {
        opacity: 0;
        transform: translateY(10px);
        filter: blur(8px);
    }
    22%,
    54% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-8px);
        filter: blur(7px);
    }
}

@keyframes successToast {
    0% {
        opacity: 0;
        transform: translate3d(0, -12px, 0) scale(0.98);
    }
    12%,
    78% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate3d(0, -10px, 0) scale(0.98);
        visibility: hidden;
    }
}

@keyframes successPulse {
    0%,
    100% {
        transform: scale(0.9);
        opacity: 0.78;
    }
    50% {
        transform: scale(1.16);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        transition-duration: 1ms !important;
    }

    .intro-loader {
        display: none;
    }

    .success-toast {
        opacity: 1;
        animation: none !important;
    }
}

@media (max-width: 900px) {
    .landing-page {
        overflow: auto;
    }

    .hero-section {
        min-height: auto;
        place-items: start center;
        padding: 14px 14px 28px;
    }

    .hero-shell {
        width: min(500px, 100%);
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .hero-copy {
        display: contents;
    }

    .brand-lockup {
        justify-self: center;
        margin: 0;
    }

    .brand-lockup img {
        width: min(235px, 72vw);
    }

    .hero-copy .eyebrow {
        margin: 2px 0 -2px;
        text-align: center;
    }

    .hero-copy h1 {
        margin: 0;
        text-align: center;
        font-size: clamp(1.92rem, 9.5vw, 2.72rem);
        line-height: 1.02;
    }

    .lead {
        margin: 0 auto;
        text-align: center;
        font-size: 0.94rem;
        line-height: 1.48;
    }

    .signup-panel {
        width: 100%;
        padding: 16px;
    }

    .signup-panel h2 {
        font-size: 1.35rem;
    }

    .panel-kicker {
        margin-bottom: 8px;
        font-size: 0.7rem;
    }

    .panel-copy {
        margin-bottom: 15px;
        font-size: 0.88rem;
        line-height: 1.42;
    }

    .signup-form,
    .admin-login-form {
        gap: 8px;
    }

    label,
    .search-box span {
        font-size: 0.8rem;
    }

    input {
        min-height: 45px;
        padding: 0 12px;
    }

    button {
        min-height: 47px;
    }

    .legal-note {
        font-size: 0.7rem;
    }

}

@media (max-width: 520px) {
    .success-toast {
        top: auto;
        right: 10px;
        bottom: 10px;
        width: calc(100% - 20px);
    }

    .hero-section {
        padding: 10px 10px 24px;
    }

    .brand-lockup img {
        width: min(205px, 70vw);
    }

    .hero-copy h1 {
        font-size: clamp(1.68rem, 9vw, 2.28rem);
    }

    .lead {
        font-size: 0.86rem;
    }

    .admin-heading,
    .admin-topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .logout-form button {
        width: 100%;
    }
}

.legal-document-body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 18% 24%, rgba(255, 56, 190, 0.22), transparent 30rem),
        radial-gradient(circle at 86% 30%, rgba(86, 233, 255, 0.16), transparent 32rem),
        radial-gradient(circle at 52% 86%, rgba(255, 56, 190, 0.09), transparent 30rem),
        var(--bg);
}

.legal-document-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    padding: clamp(18px, 4vw, 54px);
}

.legal-document-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, 0.8), transparent 90%);
}

.legal-document-shell {
    width: min(980px, 100%);
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
        var(--panel);
    box-shadow: var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(22px);
}

.legal-document-hero {
    padding: clamp(24px, 4vw, 44px);
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 56, 190, 0.16), transparent 24rem),
        radial-gradient(circle at 90% 12%, rgba(86, 233, 255, 0.11), transparent 22rem);
}

.legal-document-brand {
    margin-bottom: clamp(20px, 4vw, 34px);
}

.legal-document-brand img {
    width: min(260px, 70vw);
}

.legal-document-hero h1 {
    max-width: 780px;
    margin: 0;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.04;
    letter-spacing: 0;
}

.legal-document-updated {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.6;
}

.legal-document-content {
    padding: clamp(24px, 4vw, 44px);
}

.legal-page-heading {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 34px 0 14px;
    color: #ffffff;
    font-size: clamp(1.12rem, 2vw, 1.36rem);
    line-height: 1.28;
}

.legal-page-heading:first-child {
    margin-top: 0;
}

.legal-page-heading span {
    display: inline-flex;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(101, 242, 184, 0.42);
    border-radius: 50%;
    color: var(--mint);
    background: rgba(101, 242, 184, 0.08);
    font-size: 0.92rem;
    font-weight: 950;
}

.legal-page-paragraph {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.82;
    overflow-wrap: anywhere;
}

.legal-page-list {
    margin: 0 0 18px;
    padding-left: 24px;
    color: var(--muted);
}

.legal-page-list li {
    margin: 8px 0;
    line-height: 1.7;
    padding-left: 4px;
    overflow-wrap: anywhere;
}

.legal-page-list li::marker {
    color: var(--mint);
}

@media (max-width: 640px) {
    .legal-document-page {
        padding: 10px;
    }

    .legal-document-hero,
    .legal-document-content {
        padding: 22px;
    }

    .legal-page-heading {
        align-items: flex-start;
        gap: 10px;
    }

    .legal-page-heading span {
        width: 28px;
        height: 28px;
        font-size: 0.82rem;
    }
}
