.nnweb-renew-page {
    max-width: 960px;
    --nnweb-renew-accent: #121212;
    --nnweb-renew-accent-hover: #000000;
    --nnweb-renew-accent-active: #1a1a1a;
    --nnweb-renew-btn-shadow: 0 8px 22px rgba(18, 18, 18, 0.28);
    --nnweb-renew-btn-shadow-active: 0 3px 10px rgba(18, 18, 18, 0.22);
}

.nnweb-renew-section {
    margin-top: 32px;
}

.nnweb-renew-section__grid {
    display: grid;
    gap: 16px;
}

.nnweb-renew-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.nnweb-renew-card__media {
    overflow: hidden;
    border-radius: 12px;
    background: #f1f5f9;
    min-height: 100px;
}

.nnweb-renew-card__thumb-img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100px;
    object-fit: cover;
}

.nnweb-renew-card__thumb-placeholder {
    width: 100%;
    min-height: 100px;
    background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

.nnweb-renew-card__title {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
    color: #0f172a;
}

.nnweb-renew-card__meta {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
}

.nnweb-renew-card__hint {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.45;
}

.nnweb-renew-card__notice {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 13px;
    line-height: 1.45;
}

.nnweb-renew-card.is-renew-disabled .nnweb-renew-card__form {
    opacity: 0.42;
    pointer-events: none;
    filter: grayscale(0.15);
}

.nnweb-renew-card.is-renew-disabled .nnweb-renew-card__title,
.nnweb-renew-card.is-renew-disabled .nnweb-renew-card__meta,
.nnweb-renew-card.is-renew-disabled .nnweb-renew-card__notice,
.nnweb-renew-card.is-renew-disabled .nnweb-renew-card__media {
    opacity: 0.88;
}

.nnweb-renew-card.is-expired {
    border-color: #fde68a;
    box-shadow: 0 8px 24px rgba(180, 83, 9, 0.08);
}

.nnweb-renew-card__meta--expired {
    color: #b45309;
}

.nnweb-renew-card__notice--expired {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.nnweb-renew-card.is-revoked {
    border-color: #fecaca;
    box-shadow: 0 8px 24px rgba(185, 28, 28, 0.06);
}

.nnweb-renew-card__meta--cancelled {
    color: #b91c1c;
}

.nnweb-renew-card__notice--resubscribe {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.nnweb-renew-card__plans {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.nnweb-renew-plan {
    display: block;
    margin: 0;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nnweb-renew-plan:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.nnweb-renew-plan.is-selected {
    border-color: #2563eb;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

.nnweb-renew-plan.is-selected:hover {
    border-color: #2563eb;
}

.nnweb-renew-plan__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nnweb-renew-plan__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.nnweb-renew-plan__label {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.nnweb-renew-plan__price {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
}

.nnweb-renew-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
    margin: 4px 0 0;
    padding: 0 20px;
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: var(--nnweb-renew-accent);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.nnweb-renew-btn:hover,
.nnweb-renew-btn:focus-visible {
    background: var(--nnweb-renew-accent-hover);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--nnweb-renew-btn-shadow);
}

.nnweb-renew-btn:active {
    background: var(--nnweb-renew-accent-active);
    color: #fff;
    transform: translateY(0);
    box-shadow: var(--nnweb-renew-btn-shadow-active);
}

.nnweb-renew-history {
    margin-top: 40px;
    padding-top: 8px;
}

.nnweb-renew-history__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.nnweb-renew-history__title {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    color: #0f172a;
}

.nnweb-renew-history__link {
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    white-space: nowrap;
}

.nnweb-renew-history__link:hover {
    text-decoration: underline;
}

.nnweb-renew-history__panel {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.nnweb-renew-history-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.nnweb-renew-history-card:last-child {
    border-bottom: 0;
}

.nnweb-renew-history-card__media {
    width: 72px;
    height: 72px;
    overflow: hidden;
    border-radius: 12px;
    background: #f1f5f9;
    flex-shrink: 0;
}

.nnweb-renew-history-card__thumb,
.nnweb-renew-history-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nnweb-renew-history-card__thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

.nnweb-renew-history-card__title {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.35;
    color: #0f172a;
}

.nnweb-renew-history-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 13px;
    color: #64748b;
}

.nnweb-renew-history-card__order-ref {
    font-weight: 700;
    color: #0f172a;
}

.nnweb-renew-history-card__dot {
    color: #cbd5e1;
}

.nnweb-renew-history-card__date,
.nnweb-renew-history-card__duration,
.nnweb-renew-history-card__valid-until,
.nnweb-renew-history-card__payment,
.nnweb-renew-history-card__refund,
.nnweb-renew-history-card__net {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: #475569;
}

.nnweb-renew-history-card__date strong,
.nnweb-renew-history-card__duration strong,
.nnweb-renew-history-card__valid-until strong,
.nnweb-renew-history-card__payment strong,
.nnweb-renew-history-card__refund strong,
.nnweb-renew-history-card__net strong,
.nnweb-renew-history-card__meta strong {
    font-weight: 700;
    color: #0f172a;
}

.nnweb-renew-history-card__aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 112px;
}

.nnweb-renew-history-card__status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    background: #f1f5f9;
    color: #475569;
}

.nnweb-renew-history-card__status.is-completed {
    background: #ecfdf5;
    color: #047857;
}

.nnweb-renew-history-card__status.is-processing,
.nnweb-renew-history-card__status.is-pending,
.nnweb-renew-history-card__status.is-on-hold {
    background: #eff6ff;
    color: #1d4ed8;
}

.nnweb-renew-history-card__status.is-cancelled,
.nnweb-renew-history-card__status.is-failed {
    background: #fef2f2;
    color: #b91c1c;
}

.nnweb-renew-history-card__status.is-refunded {
    background: #fff7ed;
    color: #c2410c;
}

.nnweb-renew-history-card__status.is-partial-refund {
    background: #ffedd5;
    color: #9a3412;
}

.nnweb-renew-history-card__refund {
    color: #b45309;
}

.nnweb-renew-history-card__amount {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
}

.nnweb-renew-history-card__pay {
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.nnweb-renew-history-card__pay:hover {
    text-decoration: underline;
}

.nnweb-renew-history__empty {
    margin: 0;
}

.nnweb-renew-history__footnote {
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.45;
}

@media (max-width: 782px) {
    .nnweb-renew-card {
        grid-template-columns: 1fr;
    }

    .nnweb-renew-card__media {
        max-height: 180px;
    }

    .nnweb-renew-plan__body {
        flex-direction: column;
        align-items: flex-start;
    }

    .nnweb-renew-plan__price {
        white-space: normal;
    }

    .nnweb-renew-history__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .nnweb-renew-history-card {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .nnweb-renew-history-card__aside {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-width: 0;
    }
}
