/* =========================================================
   MEMBERSHIP PAYMENT SUCCESS PAGE
========================================================= */

.membership-success-page {
    min-height: 100vh;

    padding: 35px 15px 50px;

    background:
        radial-gradient(
            circle at 50% 5%,
            rgba(251, 184, 1, 0.12) 0%,
            rgba(251, 184, 1, 0) 30%
        ),
        linear-gradient(
            135deg,
            #eef5ff 0%,
            #f8f9fc 45%,
            #fff8df 100%
        );

    position: relative;

    overflow: hidden;
}


/* =========================================================
   BACKGROUND DECORATION
========================================================= */

.membership-success-page::before {
    content: "";

    position: absolute;

    width: 500px;
    height: 500px;

    top: -250px;
    left: 50%;

    transform: translateX(-50%);

    background:
        radial-gradient(
            circle,
            rgba(251, 184, 1, 0.12) 0%,
            rgba(251, 184, 1, 0) 70%
        );

    pointer-events: none;
}


.membership-success-page::after {
    content: "";

    position: absolute;

    width: 100%;
    height: 5px;

    left: 0;
    bottom: 0;

    background:
        linear-gradient(
            90deg,
            #001229 0%,
            #1565c0 45%,
            #fbb801 100%
        );

    opacity: .9;
}


/* =========================================================
   CONTAINER
========================================================= */

.membership-success-container {
    position: relative;

    z-index: 1;

    width: 100%;

    max-width: 560px;

    margin: 0 auto;

    text-align: center;
}


/* =========================================================
   HEADER
========================================================= */

.membership-success-header {
    margin-bottom: 20px;
}


.membership-success-check {
    width: 48px;
    height: 48px;

    margin: 0 auto 8px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #fbb801;

    color: #001229;

    font-size: 24px;

    box-shadow:
        0 6px 18px rgba(251, 184, 1, .25);
}


.membership-success-header h1 {
    margin: 0;

    color: #001229;

    font-size: 35px;

    line-height: 1.25;

    font-weight: 800;
}


.membership-success-header .success-subtitle {
    margin: 5px 0 0;

    color: #243b5a;

    font-size: 24px;

    font-weight: 600;
}


.membership-success-header .success-description {
    margin: 6px 0 0;

    color: #667085;

    font-size: 25px;

    line-height: 1.6;
}


/* =========================================================
   FAILED
========================================================= */

.membership-status-failed {
    background: #dc3545;

    color: #fff;

    box-shadow:
        0 6px 18px rgba(220, 53, 69, .20);
}


/* =========================================================
   PROCESSING
========================================================= */

.membership-status-processing {
    background: #fbb801;

    color: #526071;

    box-shadow:
        0 6px 18px rgba(82, 96, 113, .15);
}


/* =========================================================
   POSTER
========================================================= */

.membership-success-poster {
    width: 100%;

    max-width: 500px;

    margin: 0 auto;

    padding: 6px;

    background: #fff;

    border-radius: 10px;

    box-shadow:
        0 12px 35px rgba(0, 18, 41, .16);

    box-sizing: border-box;
}


.membership-success-poster-image {
    display: block;

    width: 100%;

    height: auto;

    border-radius: 6px;
}


/* =========================================================
   MEMBERSHIP INFORMATION
========================================================= */

.membership-success-info {
    width: 100%;

    max-width: 500px;

    margin: 14px auto 0;

    padding: 12px 18px;

    box-sizing: border-box;

    background: rgba(255,255,255,.96);

    border: 1px solid rgba(0,18,41,.06);

    border-radius: 9px;

    box-shadow:
        0 5px 18px rgba(0,0,0,.07);

    text-align: left;
}


.membership-success-info .success-info-row {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    padding: 7px 0;

    border-bottom: 1px dashed #e1e5eb;

    font-size: 25px;
}


.membership-success-info .success-info-row:last-child {
    border-bottom: 0;
}


.membership-success-info .success-info-row span {
    color: #667085;
}


.membership-success-info .success-info-row strong {
    color: #001229;

    font-weight: 700;

    text-align: right;

    word-break: break-word;
}


.membership-success-info .success-amount-row strong {
    color: #c58d00;

    font-size: 25px;
}


/* =========================================================
   ACTIONS
========================================================= */

.membership-success-actions {
    width: 100%;

    max-width: 500px;

    margin: 14px auto 0;
}


/* =========================================================
   DOWNLOAD BUTTON
========================================================= */

.membership-success-actions .btn-download-receipt {
    width: 100%;

    min-height: 48px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    box-sizing: border-box;

    border-radius: 7px;

    background:
        linear-gradient(
            135deg,
            #ffd740 0%,
            #fbb801 100%
        );

    color: #001229 !important;

    text-decoration: none !important;

    font-size: 25px;

    font-weight: 800;

    box-shadow:
        0 5px 15px rgba(251,184,1,.25);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}


.membership-success-actions .btn-download-receipt:hover {
    color: #001229 !important;

    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(251,184,1,.35);
}


.membership-success-actions .btn-download-receipt i {
    font-size: 25px;
}


/* =========================================================
   EMAIL NOTICE
========================================================= */

.membership-success-actions .receipt-email-notice {
    margin-top: 9px;

    padding: 12px 14px;

    display: flex;

    align-items: flex-start;

    gap: 10px;

    text-align: left;

    background:
        rgba(238,245,255,.95);

    border:
        1px solid #d9e5f5;

    border-radius: 7px;
}


.membership-success-actions .receipt-email-icon {
    width: 36px;
    height: 36px;

    flex: 0 0 36px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #001f4d;

    color: #fff;

    font-size: 25px;
}


.membership-success-actions .receipt-email-text {
    min-width: 0;
}


.membership-success-actions .receipt-email-text strong {
    display: block;

    margin-bottom: 2px;

    color: #001229;

    font-size: 25px;
}


.membership-success-actions .receipt-email-text p {
    margin: 0;

    color: #526071;

    font-size: 25px;

    line-height: 1.5;
}


.membership-success-actions .receipt-email-text small {
    display: block;

    margin-top: 3px;

    color: #7b8794;

    font-size: 25px;

    line-height: 1.4;
}


/* =========================================================
   RECEIPT / STATUS BOX
========================================================= */

.membership-success-actions .receipt-generating {
    width: 100%;

    min-height: 48px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    border-radius: 7px;

    background: #eef1f5;

    color: #667085;

    font-size: 25px;

    text-align: center;

    padding: 8px 12px;
}


.membership-success-actions .receipt-generating i {
    flex: 0 0 auto;
}


/* =========================================================
   HOME BUTTON
========================================================= */

.membership-success-home {
    margin-top: 13px;
}


.membership-success-home .btn-success-home {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    min-width: 160px;

    min-height: 40px;

    padding: 0 22px;

    box-sizing: border-box;

    border: 1px solid #001229;

    border-radius: 6px;

    background: rgba(255,255,255,.7);

    color: #001229 !important;

    text-decoration: none !important;

    font-size: 20px;

    font-weight: 700;

    transition: .2s ease;
}


.membership-success-home .btn-success-home:hover {
    background: #001229;

    color: #fff !important;
}


/* =========================================================
   FOOTER
========================================================= */

.membership-success-footer {
    margin-top: 14px;

    color: #7a8492;

    font-size: 25px;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 650px) {

    .membership-success-page {
        padding:
            28px 12px 40px;
    }


    .membership-success-header h1 {
        font-size: 30px;
    }


    .membership-success-header .success-subtitle {
        font-size: 20px;
    }


    .membership-success-header .success-description {
        font-size: 18px;
    }


    .membership-success-info .success-info-row {
        font-size: 18px;

        gap: 10px;
    }


    .membership-success-info .success-amount-row strong {
        font-size: 19px;
    }


    .membership-success-actions .btn-download-receipt {
        font-size: 19px;
    }


    .membership-success-actions .receipt-email-text strong {
        font-size: 18px;
    }


    .membership-success-actions .receipt-email-text p {
        font-size: 25px;
    }


    .membership-success-actions .receipt-email-text small {
        font-size: 16px;
    }


    .membership-success-actions .receipt-generating {
        font-size: 25px;
    }


    .membership-success-footer {
        font-size: 25px;
    }

}


@media (max-width: 430px) {

    .membership-success-header h1 {
        font-size: 27px;
    }


    .membership-success-header .success-subtitle {
        font-size: 18px;
    }


    .membership-success-header .success-description {
        font-size: 25px;
    }


    .membership-success-poster {
        max-width: 100%;
    }


    .membership-success-info {
        padding:
            10px 14px;
    }


    .membership-success-info .success-info-row {
        font-size: 25px;

        align-items: flex-start;
    }


    .membership-success-info .success-info-row strong {
        max-width: 58%;
    }


    .membership-success-actions .btn-download-receipt {
        font-size: 18px;
    }


    .membership-success-home .btn-success-home {
        font-size: 18px;
    }

}


/* =========================================================
   MEMBERSHIP PAYMENT HISTORY
   ========================================================= */

.membership-history-page {
    position: relative;
    min-height: 100vh;
    padding: 55px 20px 70px;
    background:
        radial-gradient(circle at 15% 10%, rgba(251, 184, 1, 0.12), transparent 28%),
        radial-gradient(circle at 85% 15%, rgba(21, 101, 192, 0.12), transparent 30%),
        linear-gradient(135deg, #f8fafc 0%, #eef3f8 100%);
}

.membership-history-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.membership-history-header {
    text-align: center;
    margin-bottom: 32px;
}

.membership-history-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: linear-gradient(
        135deg,
        #FFD740 0%,
        #1976D2 50%,
        #0D47A1 100%
    );
    box-shadow:
        0 12px 30px rgba(13, 71, 161, 0.18),
        0 4px 12px rgba(251, 184, 1, 0.18);
}

.membership-history-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.membership-history-header h1 {
    margin: 0;
    color: #0D2A52;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
}

.membership-history-header p {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 25px;
    line-height: 1.6;
}


/* =========================================================
   SUMMARY
   ========================================================= */

.membership-history-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.history-summary-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 22px 24px;
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.history-summary-card::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -35px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(25, 118, 210, 0.05);
}

.history-summary-card.success::after {
    background: rgba(22, 163, 74, 0.06);
}

.history-summary-card.pending::after {
    background: rgba(245, 158, 11, 0.07);
}

.history-summary-icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #eef5ff;
}

.history-summary-card.success .history-summary-icon {
    background: #ecfdf3;
}

.history-summary-card.pending .history-summary-icon {
    background: #fff8e6;
}

.history-summary-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.history-summary-label {
    color: #64748b;
    font-size: 25px;
    margin-bottom: 2px;
}

.history-summary-value {
    color: #0D2A52;
    font-size: 28px;
    line-height: 1.1;
    font-weight: 800;
}

.history-summary-card.success .history-summary-value {
    color: #15803d;
}

.history-summary-card.pending .history-summary-value {
    color: #d97706;
}


/* =========================================================
   MAIN CARD
   ========================================================= */

.membership-history-card {
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 22px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.07);
    overflow: hidden;
}

.membership-history-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 30px;
    border-bottom: 1px solid #edf0f4;
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #fbfcfe 100%
    );
}

.membership-history-card-header h2 {
    margin: 0;
    color: #0D2A52;
    font-size: 25px;
    font-weight: 800;
}

.membership-history-card-header p {
    margin: 4px 0 0;
    color: #7b8794;
    font-size: 25px;
}


/* สมัครสมาชิก */

.btn-new-membership {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: 12px;
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #FFD740 0%,
        #1565C0 45%,
        #0D47A1 100%
    );
    font-size: 20px;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 7px 18px rgba(13, 71, 161, 0.18);
    transition: all 0.2s ease;
}

.btn-new-membership span {
    font-size: 19px;
    line-height: 1;
}

.btn-new-membership:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(13, 71, 161, 0.25);
}


/* =========================================================
   HISTORY LIST
   ========================================================= */

.membership-history-list {
    padding: 0;
}

.membership-history-item {
    display: grid;
    grid-template-columns: minmax(270px, 1.3fr) minmax(320px, 1.5fr) 190px;
    align-items: center;
    gap: 24px;
    padding: 25px 30px;
    border-bottom: 1px solid #edf0f4;
    transition: background 0.2s ease;
}

.membership-history-item:last-child {
    border-bottom: 0;
}

.membership-history-item:hover {
    background: #fbfdff;
}


/* =========================================================
   ITEM MAIN
   ========================================================= */

.history-item-main {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

.history-item-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        #fff8dc 0%,
        #edf5ff 100%
    );
    border: 1px solid #edf0d9;
}

.history-item-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.history-item-info {
    min-width: 0;
}

.history-item-title {
    color: #0D2A52;
    font-size: 27px;
    font-weight: 800;
    line-height: 1.4;
    word-break: break-word;
}

.history-item-invoice,
.history-item-date {
    margin-top: 4px;
    color: #7b8794;
    font-size: 24px;
    line-height: 1.5;
}

.history-item-invoice strong {
    color: #475569;
    font-weight: 700;
}


/* =========================================================
   DETAILS
   ========================================================= */

.history-item-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 12px 24px;
}

.history-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.history-detail-label {
    color: #94a3b8;
    font-size: 22px;
}

.history-detail > span:not(.history-detail-label),
.history-detail > strong {
    color: #334155;
    font-size: 22px;
    font-weight: 600;
    word-break: break-word;
}

.history-detail-amount {
    color: #0D47A1 !important;
    font-size: 22px !important;
    font-weight: 800 !important;
}


/* =========================================================
   RIGHT / STATUS
   ========================================================= */

.history-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.membership-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 22px;
    font-weight: 700;
    white-space: nowrap;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.membership-status.paid {
    color: #15803d;
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
}

.membership-status.pending {
    color: #b45309;
    background: #fff8e6;
    border: 1px solid #fde68a;
}

.membership-status.processing {
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.membership-status.failed {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.membership-status.cancelled {
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.membership-status.expired {
    color: #9333ea;
    background: #faf5ff;
    border: 1px solid #e9d5ff;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.history-item-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-history-receipt,
.btn-history-pay {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-history-receipt {
    color: #0D47A1 !important;
    background: #eef5ff;
    border: 1px solid #cfe0f5;
}

.btn-history-receipt:hover {
    color: #0D47A1 !important;
    background: #e1efff;
    transform: translateY(-1px);
}

.btn-history-pay {
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #FFD740 0%,
        #1565C0 45%,
        #0D47A1 100%
    );
    border: 0;
    box-shadow: 0 5px 14px rgba(13, 71, 161, 0.16);
}

.btn-history-pay:hover {
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(13, 71, 161, 0.22);
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.membership-history-empty {
    padding: 70px 25px;
    text-align: center;
}

.history-empty-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: linear-gradient(
        135deg,
        #fff8dc 0%,
        #edf5ff 100%
    );
}

.history-empty-icon img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.membership-history-empty h3 {
    margin: 0;
    color: #334155;
    font-size: 21px;
    font-weight: 800;
}

.membership-history-empty p {
    max-width: 500px;
    margin: 8px auto 22px;
    color: #94a3b8;
    font-size: 25px;
    line-height: 1.7;
}

.btn-start-membership {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 22px;
    border-radius: 12px;
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #FFD740 0%,
        #1565C0 45%,
        #0D47A1 100%
    );
    font-size: 25px;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 7px 18px rgba(13, 71, 161, 0.18);
    transition: all 0.2s ease;
}

.btn-start-membership:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
}


/* =========================================================
   BACK BUTTON
   ========================================================= */

.membership-history-back {
    padding-top: 24px;
    text-align: center;
}

.btn-history-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b !important;
    font-size: 25px;
    font-weight: 600;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.btn-history-back:hover {
    color: #0D47A1 !important;
}

.receipt-not-ready {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 10px;
    color: #94a3b8;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 22px;
    font-weight: 600;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 992px) {

    .membership-history-item {
        grid-template-columns: 1fr 1fr;
    }

    .history-item-right {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding-top: 5px;
    }

    .membership-history-summary {
        grid-template-columns: repeat(3, 1fr);
    }
}


@media (max-width: 768px) {

    .membership-history-page {
        padding: 35px 14px 50px;
    }

    .membership-history-header h1 {
        font-size: 27px;
    }

    .membership-history-header p {
        font-size: 25px;
    }

    .membership-history-summary {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .history-summary-card {
        padding: 17px 18px;
    }

    .membership-history-card-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 21px 20px;
    }

    .btn-new-membership {
        width: 100%;
    }

    .membership-history-item {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 22px 20px;
    }

    .history-item-details {
        grid-template-columns: 1fr 1fr;
    }

    .history-item-right {
        grid-column: auto;
        align-items: flex-start;
        flex-direction: column;
    }

    .history-item-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .btn-history-receipt,
    .btn-history-pay {
        width: 100%;
    }
}


@media (max-width: 480px) {

    .membership-history-page {
        padding: 25px 10px 40px;
    }

    .membership-history-header {
        margin-bottom: 22px;
    }

    .membership-history-icon {
        width: 64px;
        height: 64px;
        border-radius: 18px;
    }

    .membership-history-icon img {
        width: 40px;
        height: 40px;
    }

    .membership-history-header h1 {
        font-size: 23px;
    }

    .membership-history-header p {
        font-size: 24px;
    }

    .history-summary-card {
        padding: 15px;
    }

    .history-summary-value {
        font-size: 25px;
    }

    .membership-history-card {
        border-radius: 17px;
    }

    .membership-history-card-header h2 {
        font-size: 19px;
    }

    .membership-history-item {
        padding: 20px 15px;
    }

    .history-item-icon {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
    }

    .history-item-icon img {
        width: 31px;
        height: 31px;
    }

    .history-item-title {
        font-size: 16px;
    }

    .history-item-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .history-item-right {
        gap: 10px;
    }
}