:root {
    --tpg-page-bg: #eceff3;
    --tpg-card-bg: rgba(255, 255, 255, 0.72);
    --tpg-card-border: rgba(15, 23, 42, 0.08);
    --tpg-text: #111318;
    --tpg-muted: #6d7280;
    --tpg-input-bg: rgba(255, 255, 255, 0.88);
    --tpg-input-border: rgba(17, 19, 24, 0.1);
    --tpg-button-bg: #111318;
    --tpg-button-text: #ffffff;
    --tpg-danger-bg: rgba(184, 58, 48, 0.08);
    --tpg-danger-border: rgba(184, 58, 48, 0.14);
    --tpg-danger-text: #b83a30;
}

* {
    box-sizing: border-box;
}

body.tpg-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--tpg-text);
    background:
        radial-gradient(circle at top center, rgba(255, 255, 255, 0.92), transparent 34%),
        linear-gradient(180deg, var(--tpg-page-bg) 0%, #f7f8fa 100%);
}

.tpg-background-media,
.tpg-background-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.tpg-background-media {
    position: fixed;
    inset: 0;
    background-image: var(--tpg-background-image);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.76;
}

.tpg-background-media::after {
    content: "";
    position: absolute;
    inset: -24px;
    background-image: var(--tpg-background-image);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(18px) saturate(1.05);
    opacity: 0.48;
    transform: scale(1.06);
}

.tpg-background-overlay {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(248, 249, 251, 0.52) 100%);
}

body.tpg-body.tpg-has-background {
    background:
        radial-gradient(circle at top center, rgba(255, 255, 255, 0.4), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(247, 248, 250, 0.34) 100%);
}

.tpg-shell {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
}

.tpg-panel {
    position: relative;
    width: min(100%, 560px);
    padding: clamp(28px, 4vw, 46px);
    border: 1px solid var(--tpg-card-border);
    border-radius: 34px;
    background: var(--tpg-card-bg);
    backdrop-filter: blur(24px);
    box-shadow:
        0 36px 90px rgba(15, 23, 42, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.tpg-panel::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 33px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
}

.tpg-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(17, 19, 24, 0.06);
    color: #5f6470;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tpg-logo-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 22px 0 20px;
}

.tpg-logo-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 180px;
    max-width: 100%;
    padding: 16px 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(17, 19, 24, 0.06);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
}

.tpg-logo {
    display: block;
    max-width: min(220px, 100%);
    max-height: 78px;
    width: auto;
    height: auto;
}

.tpg-title {
    margin: 0;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    font-weight: 800;
}

.tpg-subtitle {
    margin: 16px 0 0;
    max-width: 430px;
    color: var(--tpg-muted);
    font-size: 16px;
    line-height: 1.7;
}

.tpg-alert {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--tpg-danger-border);
    background: var(--tpg-danger-bg);
    color: var(--tpg-danger-text);
    font-size: 14px;
    font-weight: 600;
}

.tpg-form {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.tpg-input {
    width: 100%;
    min-height: 60px;
    padding: 0 18px;
    border: 1px solid var(--tpg-input-border);
    border-radius: 20px;
    outline: none;
    background: var(--tpg-input-bg);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 8px 20px rgba(15, 23, 42, 0.04);
    color: var(--tpg-text);
    font: inherit;
    font-size: 16px;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.tpg-input::placeholder {
    color: #8f96a3;
}

.tpg-input:focus {
    border-color: rgba(17, 19, 24, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.94),
        0 0 0 5px rgba(17, 19, 24, 0.05);
    transform: translateY(-1px);
}

.tpg-button {
    min-height: 58px;
    border: 0;
    border-radius: 20px;
    background: var(--tpg-button-bg);
    color: var(--tpg-button-text);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 18px 30px rgba(17, 19, 24, 0.12);
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.tpg-button:hover {
    opacity: 0.96;
    transform: translateY(-1px);
    box-shadow: 0 22px 34px rgba(17, 19, 24, 0.14);
}

.tpg-button:active {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .tpg-shell {
        padding: 16px;
    }

    .tpg-panel {
        border-radius: 28px;
        padding: 24px 20px;
    }

    .tpg-panel::after {
        border-radius: 27px;
    }

    .tpg-title {
        font-size: 36px;
    }

    .tpg-subtitle {
        font-size: 15px;
    }

    .tpg-logo-frame {
        width: 100%;
    }
}
