@font-face {
    font-family: "Lato";
    src: url("fonts/Lato-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Lato";
    src: url("fonts/Lato-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Lato";
    src: url("fonts/Lato-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Lato";
    src: url("fonts/Lato-ExtraBold.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --blue-100: #e4ebff;
    --blue-200: #d9e3ff;
    --blue-300: #bfd1ff;
    --blue-400: #8cacff;
    --blue-500: #668be6;
    --blue-600: #4268c8;

    --pink-100: #fbf7ff;
    --pink-200: #f3ebff;
    --pink-300: #e9d8ff;
    --pink-400: #d9bdff;
    --pink-500: #cca5ff;
    --pink-600: #a278da;

    --red-100: #fff2f2;
    --red-300: #ffe0e0;
    --red-600: #e56d6d;

    --yellow-100: #fffdf7;
    --yellow-300: #fff1d1;
    --yellow-500: #ffdb85;

    --gray-100: #ffffff;
    --gray-200: #dfe2ee;
    --gray-300: #979fb7;
    --gray-400: #70778c;
    --gray-500: #4e566b;
    --gray-600: #363753;
    --gray-700: #202240;
    --gray-800: #0e0f27;

    --bg-gradient: linear-gradient(
        135deg,
        #bfd0ff 0%,
        #d9bdff 38%,
        #ffe0e0 72%,
        #fff9eb 100%
    );

    --text-gradient: linear-gradient(
        90deg,
        #8cacff 0%,
        #d9bdff 100%
    );

    --shadow: 0 24px 80px rgba(14, 15, 39, 0.14);
    --radius: 28px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--gray-700);
    background:
        radial-gradient(
            circle at top left,
            rgba(255, 255, 255, 0.72),
            transparent 34rem
        ),
        radial-gradient(
            circle at bottom right,
            rgba(255, 255, 255, 0.48),
            transparent 30rem
        ),
        var(--bg-gradient);
    font-family: "Lato", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.page-shell {
    width: 100%;
    min-height: 100vh;
    padding: 28px 20px 48px;
}

.portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(920px, 100%);
    min-height: 42px;
    margin: 0 auto 16px;
}

.brand {
    color: var(--gray-800);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.045em;
    text-decoration: none;
}

.brand-large {
    display: inline-block;
    margin-bottom: 28px;
    font-size: 34px;
}

.text-button {
    border: 0;
    border-bottom: 1px solid rgba(66, 104, 200, 0.28);
    padding: 5px 0;
    color: var(--blue-600);
    background: transparent;
    font-size: 14px;
    font-weight: 700;
}

.text-button:hover {
    border-bottom-color: currentColor;
}

.portal-layout {
    width: min(920px, 100%);
    margin: 0 auto;
}

.content-card,
.auth-card {
    width: 100%;
    border: 1px solid rgba(223, 226, 238, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.content-card {
    padding: clamp(28px, 5vw, 72px);
}

.account-hero {
    text-align: center;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--gray-400);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    color: var(--gray-800);
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.08;
}

.subtitle {
    max-width: 620px;
    margin: 22px auto 0;
    color: var(--gray-500);
    font-size: 17px;
}

.account-section {
    margin-top: 34px;
    padding-top: 30px;
    border-top: 1px solid var(--gray-200);
}

.account-section h2 {
    margin: 0 0 18px;
    color: var(--gray-800);
    font-size: clamp(22px, 3vw, 27px);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.18;
}

.account-email {
    display: grid;
    gap: 4px;
    padding: 18px 20px;
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    background: linear-gradient(
        135deg,
        var(--pink-100),
        var(--yellow-100)
    );
}

.account-email-label {
    color: var(--gray-400);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.account-email-value {
    overflow-wrap: anywhere;
    color: var(--gray-700);
    font-weight: 700;
}

.form-stack {
    display: grid;
    gap: 10px;
}

.profile-form {
    margin-top: 22px;
}

label {
    margin-top: 8px;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 52px;
    padding: 13px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    outline: none;
    color: var(--gray-700);
    background: rgba(255, 255, 255, 0.96);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;
}

input::placeholder {
    color: var(--gray-400);
    opacity: 1;
}

input:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 4px rgba(140, 172, 255, 0.22);
}

.primary-button {
    min-height: 52px;
    margin-top: 16px;
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    color: var(--gray-100);
    background: linear-gradient(
        90deg,
        var(--blue-600),
        var(--pink-600)
    );
    font-weight: 800;
    letter-spacing: 0.01em;
    box-shadow: 0 12px 26px rgba(66, 104, 200, 0.24);
    transition:
        transform 160ms ease,
        filter 160ms ease;
}

.primary-button:hover {
    filter: brightness(1.04);
}

.primary-button:active {
    transform: translateY(1px);
}

.notice {
    margin: 26px 0 0;
    padding: 17px 19px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.notice-error {
    border: 1px solid var(--red-300);
    color: var(--gray-700);
    background: var(--red-100);
}

.notice-success {
    border: 1px solid rgba(121, 183, 138, 0.34);
    color: #276740;
    background: #edf8ee;
}

.premium-section {
    scroll-margin-top: 20px;
}

.premium-intro {
    padding: 24px;
    border: 1px solid var(--gray-200);
    border-radius: 22px;
    background:
        radial-gradient(
            circle at top right,
            rgba(255, 255, 255, 0.72),
            transparent 13rem
        ),
        linear-gradient(
            135deg,
            var(--blue-100),
            var(--pink-200) 52%,
            var(--yellow-100)
        );
}

.premium-eyebrow {
    margin-bottom: 9px;
}

.premium-intro h2 {
    margin-bottom: 10px;
}

.premium-intro h2 span {
    background: var(--text-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.lead {
    max-width: 580px;
    margin: 0;
    color: var(--gray-600);
    font-size: 17px;
}

.price-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    min-height: 42px;
    margin-top: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(162, 120, 218, 0.3);
    border-radius: 999px;
    color: #7379b4;
    background: rgba(255, 255, 255, 0.64);
}

.price-pill strong {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.035em;
}

.price-pill span {
    color: var(--gray-500);
    font-size: 13px;
    font-weight: 700;
}

.premium-features {
    margin-top: 24px;
    padding: 22px;
    border: 1px solid var(--gray-200);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.68);
}

.features-title {
    margin: 0 0 12px;
    color: var(--gray-400);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.feature-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 14px;
    padding: 15px 0;
    border-top: 1px solid var(--gray-200);
}

.feature-row:first-of-type {
    border-top: 0;
}

.feature-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    color: var(--blue-600);
    background: var(--blue-100);
    font-size: 11px;
    font-weight: 800;
}

.feature-row h3 {
    margin: 0;
    color: var(--gray-800);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
}

.feature-row p {
    margin: 4px 0 0;
    color: var(--gray-500);
    font-size: 14px;
    line-height: 1.4;
}

.subscription-status {
    margin-top: 24px;
    padding: 24px;
    border: 1px solid var(--gray-200);
    border-radius: 22px;
}

.subscription-status-active {
    border-color: rgba(121, 183, 138, 0.36);
    background: linear-gradient(
        135deg,
        rgba(232, 244, 238, 0.95),
        rgba(244, 250, 247, 0.95)
    );
}

.subscription-status-free {
    background: linear-gradient(
        135deg,
        var(--pink-100),
        var(--yellow-100)
    );
}

.status-kicker {
    margin: 0 0 7px;
    color: var(--gray-400);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-title {
    margin: 0;
    color: var(--gray-800);
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.status-copy {
    margin: 9px 0 0;
    color: var(--gray-600);
}

.subscription-expiry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(112, 119, 140, 0.2);
    color: var(--gray-500);
    font-size: 14px;
}

.subscription-expiry strong {
    color: var(--gray-800);
    font-weight: 800;
    text-align: right;
}

.payment-card {
    margin-top: 20px;
    padding: 22px;
    border: 1px solid var(--gray-200);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
}

.payment-card-title {
    margin: 0 0 14px;
    color: var(--gray-800);
    font-size: 16px;
    font-weight: 800;
}

.payment-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    border-top: 1px solid rgba(112, 119, 140, 0.14);
    color: var(--gray-500);
    font-size: 14px;
}

.payment-row strong {
    max-width: 62%;
    overflow-wrap: anywhere;
    color: var(--gray-800);
    font-weight: 700;
    text-align: right;
}

.payment-status-success {
    color: #276740 !important;
}

.payment-status-pending {
    color: #8b6600 !important;
}

.payment-status-canceled {
    color: #a52849 !important;
}

.auth-layout {
    display: grid;
    min-height: calc(100vh - 76px);
    place-items: center;
}

.auth-card {
    max-width: 470px;
    margin: 20px auto;
    padding: clamp(28px, 5vw, 46px);
}

.auth-card h1 {
    font-size: clamp(29px, 6vw, 38px);
}

.auth-card .lead {
    margin: 16px 0 24px;
    color: var(--gray-500);
    font-size: 16px;
}

.auth-note {
    margin: 24px 0 0;
    color: var(--gray-400);
    font-size: 14px;
    line-height: 1.5;
}

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

    .portal-header {
        margin-bottom: 12px;
    }

    .content-card,
    .auth-card {
        border-radius: 22px;
    }

    .content-card {
        padding: 28px 20px;
    }

    .premium-intro,
    .premium-features,
    .subscription-status,
    .payment-card {
        padding: 19px;
        border-radius: 19px;
    }

    .lead,
    .subtitle {
        font-size: 16px;
    }

    .subscription-expiry {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .subscription-expiry strong {
        text-align: left;
    }

    .payment-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .payment-row strong {
        max-width: 100%;
        text-align: left;
    }
}

.checkout-form {
    margin-top: 18px;
}

.premium-checkout-button {
    width: 100%;
}

.checkout-note {
    margin: 9px 0 0;
    color: var(--gray-400);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.checkout-error {
    margin-top: 18px;
    margin-bottom: 0;
}

.payment-return-layout {
    padding-top: 72px;
}

.payment-return-card {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
}

.payment-return-card .subtitle {
    max-width: 490px;
}

.payment-return-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-top: 26px;
    padding: 9px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    color: var(--gray-500);
    background: var(--yellow-100);
    font-size: 14px;
    font-weight: 700;
}

.payment-return-indicator-pending {
    color: #8b6600;
    background: var(--yellow-100);
}

.payment-return-indicator-success {
    border-color: rgba(121, 183, 138, 0.34);
    color: #276740;
    background: #edf8ee;
}

.payment-return-indicator-canceled {
    border-color: var(--red-300);
    color: #a52849;
    background: var(--red-100);
}

.payment-return-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: min(100%, 300px);
    margin-top: 28px;
    text-decoration: none;
}
