* {
    box-sizing: border-box;
}

:root {
    --bg-1: #f3fbf7;
    --bg-2: #f8fcfa;
    --bg-3: #ffffff;
    --primary: #309D75;
    --primary-dark: #267b5b;
    --primary-light: #4ab48b;
    --primary-soft: rgba(48, 157, 117, 0.10);
    --primary-softer: rgba(48, 157, 117, 0.05);
    --text: #18203b;
    --text-soft: #697391;
    --text-faint: #8f98b3;
    --border: #d8ece3;
    --border-strong: #b9dccd;
    --danger: #d7263d;
    --success: #17825e;
    --shadow-xl: 0 36px 100px rgba(48, 157, 117, 0.16);
    --shadow-lg: 0 22px 60px rgba(48, 157, 117, 0.12);
    --shadow-md: 0 14px 32px rgba(48, 157, 117, 0.09);
    --shadow-sm: 0 8px 18px rgba(48, 157, 117, 0.06);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --container-width: 980px;
    --transition: 0.24s ease;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: 'Assistant', Arial, sans-serif;
    color: var(--text);
    direction: rtl;
    background:
        radial-gradient(circle at 85% 10%, rgba(74, 180, 139, 0.15), transparent 0 22%),
        radial-gradient(circle at 10% 90%, rgba(48, 157, 117, 0.09), transparent 0 24%),
        linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 52%, var(--bg-3) 100%);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255,255,255,0.18), rgba(255,255,255,0.18)),
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 86px,
            rgba(48, 157, 117, 0.018) 87px,
            transparent 88px
        );
    opacity: 0.65;
}

body::after {
    content: "";
    position: fixed;
    width: 420px;
    height: 420px;
    left: -160px;
    bottom: -180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(48, 157, 117, 0.08), transparent 68%);
    pointer-events: none;
}

/* fallback for old pages */
.container {
    max-width: 540px;
    margin: 60px auto;
    width: calc(100% - 20px);
    padding: 30px 30px 40px;
    background: white;
    box-shadow: 0 0 3px 1px rgb(0 0 0 / 8%);
}

/* new layout */
.page-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px 16px 18px;
    position: relative;
    z-index: 1;
}

.payment-card {
    width: 100%;
    max-width: var(--container-width);
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255,255,255,0.65);
    border-radius: var(--radius-xl);
    padding: 34px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(14px);
    overflow: hidden;
}

.payment-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 7px;
    background: linear-gradient(90deg, #56ba93 0%, #309D75 52%, #267b5b 100%);
}

.payment-card::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    left: -90px;
    top: -70px;
    background: radial-gradient(circle, rgba(74, 180, 139, 0.10), transparent 70%);
    pointer-events: none;
}

.hero {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(48, 157, 117, 0.08);
}

.hero-text {
    min-width: 0;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--primary-soft);
    border: 1px solid rgba(48, 157, 117, 0.12);
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.42);
}

.hero-kicker i {
    font-size: 13px;
}

.hero-text h1,
h1 {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: clamp(2rem, 4vw, 2.7rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
}

.hero-subtitle {
    margin: 10px 0 0;
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 700;
    color: var(--text-soft);
}

.hero-description {
    margin: 12px 0 0;
    max-width: 640px;
    font-size: 1.02rem;
    line-height: 1.8;
    color: var(--text-soft);
}

.hero-logo {
    position: relative;
    flex: 0 0 auto;
}

.hero-logo::before {
    content: "";
    position: absolute;
    inset: 14% -8% -14% -8%;
    border-radius: 24px;
    background: radial-gradient(circle, rgba(48, 157, 117, 0.10), transparent 72%);
    filter: blur(10px);
    pointer-events: none;
}

.hero-logo img {
    position: relative;
    z-index: 1;
    display: block;
    height: 82px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(48, 157, 117, 0.12));
}

.helper-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 18px;
}

.helper-link a,
.title a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 800;
    font-size: 0.98rem;
    text-decoration: none;
    padding: 11px 16px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(244,251,248,0.92));
    border: 1px solid rgba(48, 157, 117, 0.12);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.helper-link a::before,
.title a::before {
    content: "ⓘ";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 14px;
    line-height: 1;
}

.helper-link a:hover,
.title a:hover {
    transform: translateY(-2px);
    color: var(--primary-dark);
    box-shadow: var(--shadow-md);
    background: linear-gradient(180deg, rgba(255,255,255,1), rgba(240,249,244,1));
}

.payment-form {
    position: relative;
    z-index: 1;
    margin-top: 0;
    padding: 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(247,251,249,0.98) 100%);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.payment-form::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(48, 157, 117, 0.12), transparent);
}

.input-field {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 13px 0;
    font-size: 18px;
    flex-wrap: wrap;
}

.input-field + .input-field {
    border-top: 1px solid rgba(48, 157, 117, 0.06);
}

.input-field label {
    flex: 0 0 138px;
    font-weight: 800;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.3;
}

.input-field input {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 58px;
    padding: 0 18px;
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    background: #ffffff;
    box-shadow:
        inset 0 1px 2px rgba(0,0,0,0.03),
        0 10px 24px rgba(48, 157, 117, 0.04);
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text);
    text-align: right;
    direction: ltr;
    letter-spacing: 1px;
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition),
        background var(--transition);
    font-family: inherit;
}

.input-field input::placeholder {
    color: #a3acc7;
    font-weight: 500;
    letter-spacing: 0;
}

.input-field input:hover {
    border-color: #add3c2;
    box-shadow:
        inset 0 1px 2px rgba(0,0,0,0.03),
        0 12px 28px rgba(48, 157, 117, 0.06);
}

.input-field input:focus {
    outline: none;
    border-color: rgba(48, 157, 117, 0.55);
    background: #fff;
    box-shadow:
        0 0 0 5px rgba(48, 157, 117, 0.12),
        0 14px 32px rgba(48, 157, 117, 0.10);
    transform: translateY(-1px);
}

.input-field.input-has-error input,
.input-field input.error {
    border-color: rgba(215, 38, 61, 0.55);
    box-shadow:
        0 0 0 5px rgba(215, 38, 61, 0.10),
        0 12px 28px rgba(215, 38, 61, 0.08);
}

.input-error {
    flex: 0 0 100%;
    margin-top: 6px;
    padding: 12px 14px;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, #ea4258, #c91f35);
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(201, 31, 53, 0.18);
}

.buttons {
    margin: 28px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

button {
    font-family: 'Assistant', Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

button.reset {
    min-width: 110px;
    height: 50px;
    padding: 0 18px;
    background: transparent;
    color: var(--danger);
    border: 0;
    outline: none;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    border-radius: 12px;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}

button.reset:hover {
    background: rgba(215, 38, 61, 0.06);
    text-decoration: none;
    transform: translateY(-1px);
}

button.submit {
    min-width: 182px;
    height: 56px;
    padding: 0 24px;
    background: linear-gradient(135deg, #4ab48b 0%, #309D75 56%, #267b5b 100%);
    color: #fff;
    font-size: 1.14rem;
    font-weight: 800;
    border: 0;
    outline: none;
    cursor: pointer;
    border-radius: 18px;
    margin-right: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow:
        0 18px 34px rgba(48, 157, 117, 0.24),
        inset 0 1px 0 rgba(255,255,255,0.20);
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        filter var(--transition);
}

button.submit:hover {
    transform: translateY(-2px);
    box-shadow:
        0 22px 38px rgba(48, 157, 117, 0.28),
        inset 0 1px 0 rgba(255,255,255,0.20);
    filter: saturate(1.04);
}

button.submit:active {
    transform: translateY(0);
}

button.submit i {
    font-size: 1rem;
}

.form-loader {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(6px);
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.form-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-radius: 22px;
    background: rgba(255,255,255,0.94);
    border: 1px solid rgba(48, 157, 117, 0.10);
    box-shadow: var(--shadow-md);
    color: var(--primary);
}

.form-loader-inner .spinner-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(48, 157, 117, 0.08);
    font-size: 24px;
}

.form-loader-inner strong {
    font-size: 0.98rem;
    font-weight: 800;
}

.contact-box,
.bottom {
    position: relative;
    z-index: 1;
    margin-top: 24px;
    padding: 18px 18px 14px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(48, 157, 117, 0.04), rgba(48, 157, 117, 0.02));
    border: 1px solid rgba(48, 157, 117, 0.08);
    text-align: center;
    font-size: 0.98rem;
    line-height: 1.9;
    color: var(--text-soft);
    box-shadow: var(--shadow-sm);
}

.contact-box a,
.bottom a {
    color: var(--text);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contact-box a:hover,
.bottom a:hover {
    color: var(--primary);
}

.declaration {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-faint);
}

.legal-link {
    text-align: center;
    margin-top: 12px;
    position: relative;
    z-index: 1;
}

.legal-link a {
    color: #6d7592;
    font-size: 13px;
    text-decoration: none;
    border-bottom: 1px solid rgba(109, 117, 146, 0.35);
    transition: color var(--transition), border-color var(--transition);
}

.legal-link a:hover {
    color: var(--primary);
    border-bottom-color: rgba(48, 157, 117, 0.5);
}

hr {
    border: 0;
    border-top: 1px solid rgba(48, 157, 117, 0.08);
    height: 1px;
    margin: 30px 0;
}

.lity-active,
.lity-active body,
body.modal-open {
    overflow: hidden;
}

.lity-container {
    max-width: 980px;
}

.lity-content {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.22);
}

button.button.green.small {
    color: green;
}

table#af_posts_table button.button.small + button,
table#af_posts_table button.button.small {
    display: inline-block;
}

tr.post-tr[data-status="1"] td {
    color: green;
}

tr.post-tr[data-status="1"] td button.green {
    display: none !important;
}

article {
    max-width: 980px;
    direction: rtl;
    margin: 30px auto;
    padding: 30px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

article p {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text);
    margin: 0 0 12px;
}

article h2 {
    font-size: 1.3rem;
    margin-bottom: 14px;
    font-weight: 800;
    margin-top: 30px;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
}

article strong {
    font-weight: 800;
    color: var(--text);
}

article a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

article h1 {
    display: block;
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 2.7rem);
    color: var(--text);
}

@media (max-width: 860px) {
    .payment-card {
        padding: 24px 18px;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hero-logo {
        order: -1;
    }

    .hero-logo img {
        height: 64px;
        max-width: 190px;
    }

    .hero-subtitle,
    .hero-description {
        max-width: none;
    }

    .payment-form {
        padding: 22px 16px;
    }

    .input-field label {
        flex: 0 0 120px;
    }
}

@media (max-width: 720px) {
    .page-shell {
        padding: 16px 10px 12px;
    }

    .payment-card {
        padding: 18px 14px;
        border-radius: 22px;
    }

    .hero {
        gap: 14px;
        margin-bottom: 16px;
        padding-bottom: 18px;
    }

    .hero-kicker {
        font-size: 13px;
        padding: 8px 12px;
    }

    .hero-text h1,
    h1 {
        font-size: 1.7rem;
        line-height: 1.08;
    }

    .hero-subtitle {
        font-size: 0.94rem;
    }

    .hero-description {
        font-size: 0.95rem;
        line-height: 1.75;
    }

    .hero-logo img {
        height: 56px;
        max-width: 160px;
    }

    .helper-link a,
    .title a {
        width: 100%;
        justify-content: center;
        text-align: center;
        border-radius: 16px;
        font-size: 0.95rem;
    }

    .payment-form {
        padding: 18px 14px;
        border-radius: 18px;
    }

    .input-field {
        gap: 8px;
        padding: 10px 0;
    }

    .input-field label {
        flex: 0 0 100%;
        font-size: 0.94rem;
    }

    .input-field input {
        height: 52px;
        font-size: 1.03rem;
        border-radius: 14px;
        padding: 0 15px;
    }

    .buttons {
        margin-top: 18px;
        flex-direction: column-reverse;
        align-items: stretch;
    }

    button.submit,
    button.reset {
        width: 100%;
        margin-right: 0;
    }

    button.submit {
        min-width: 0;
        height: 54px;
    }

    .contact-box,
    .bottom {
        font-size: 0.91rem;
        padding: 15px 12px 12px;
        border-radius: 18px;
    }

    .declaration {
        font-size: 12.5px;
    }

    .legal-link {
        margin-top: 10px;
    }

    article {
        margin: 16px 10px;
        padding: 22px 16px;
        border-radius: 20px;
    }

    article h2 {
        font-size: 1.12rem;
    }

    article p {
        font-size: 0.95rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}