.customer-rewards-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 85% 4%, rgba(227, 133, 54, 0.10), transparent 28rem),
        var(--paper, #f7f4ec);
    color: var(--ink, #12352e);
}

.rewards-shell {
    width: min(100% - 32px, 1040px);
    margin: 0 auto;
    padding: 72px 0 96px;
}

.rewards-lookup-card,
.rewards-customer-header,
.rewards-progress-card,
.rewards-section,
.rewards-message {
    border: 1px solid rgba(18, 53, 46, 0.13);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 55px rgba(28, 45, 39, 0.07);
}

.rewards-lookup-card {
    padding: clamp(24px, 5vw, 54px);
    text-align: center;
}

.rewards-eyebrow {
    margin: 0 0 12px;
    color: #d75f31;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.rewards-lookup-card h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.25rem, 7vw, 4.5rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.rewards-lookup-copy {
    max-width: 620px;
    margin: 18px auto 28px;
    color: #66746f;
    font-size: clamp(1rem, 2.2vw, 1.12rem);
    line-height: 1.65;
}

.rewards-lookup-form {
    display: flex;
    max-width: 640px;
    margin: 0 auto;
    gap: 10px;
}

.rewards-phone-field {
    flex: 1 1 auto;
    min-width: 0;
    height: 54px;
    padding: 0 18px;
    border: 1px solid #cbd3ce;
    border-radius: 14px;
    background: #fff;
    color: #173a33;
    font: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.rewards-phone-field:focus {
    border-color: #1c6a5b;
    box-shadow: 0 0 0 4px rgba(28, 106, 91, 0.12);
}

.rewards-lookup-button {
    min-height: 54px;
    padding: 0 24px;
    border: 0;
    border-radius: 14px;
    background: #123f36;
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease;
}

.rewards-lookup-button:hover {
    background: #0c3029;
    transform: translateY(-1px);
}

.rewards-lookup-button:disabled {
    cursor: wait;
    opacity: 0.7;
    transform: none;
}

.rewards-result {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.rewards-customer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 28px;
}

.rewards-customer-header h2 {
    margin: 0 0 5px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.65rem, 4vw, 2.35rem);
}

.rewards-customer-header p {
    margin: 0;
    color: #6c7974;
}

.rewards-status {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #e4f4e9;
    color: #19633e;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: capitalize;
}

.rewards-status.is-inactive,
.rewards-status.is-paused,
.rewards-status.is-disabled {
    background: #f4e8e5;
    color: #9c3e2c;
}

.reward-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.reward-summary-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid rgba(18, 53, 46, 0.12);
    border-radius: 18px;
    background: #fff;
}

.reward-summary-card span {
    display: block;
    min-height: 2.4em;
    color: #71807a;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
}

.reward-summary-card strong {
    display: block;
    margin-top: 10px;
    color: #123f36;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.45rem, 4vw, 2rem);
    line-height: 1;
}

.rewards-progress-card {
    padding: 24px 28px;
}

.rewards-progress-card h3,
.rewards-section h3 {
    margin: 0;
    font-size: 1.12rem;
}

.rewards-progress-card p {
    margin: 8px 0 0;
    color: #65736e;
    line-height: 1.55;
}

.rewards-progress-track {
    height: 10px;
    margin-top: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7ebe8;
}

.rewards-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #d9743f, #e7a83d);
    transition: width 350ms ease;
}

.rewards-section {
    padding: 26px 28px;
}

.rewards-section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.rewards-section-heading span {
    color: #7a8681;
    font-size: 0.82rem;
}

.rewards-purchase-list,
.rewards-activity-list {
    display: grid;
    gap: 12px;
}

.rewards-purchase-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reward-purchase-card,
.reward-activity-card {
    border: 1px solid #e0e5e1;
    border-radius: 16px;
    background: #fbfcfa;
}

.reward-purchase-card {
    padding: 18px;
}

.reward-purchase-top,
.reward-purchase-values,
.reward-activity-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.reward-purchase-top strong {
    color: #173e36;
}

.reward-purchase-top time,
.reward-activity-meta {
    color: #7a8681;
    font-size: 0.78rem;
}

.reward-purchase-total {
    margin: 17px 0;
    color: #123f36;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.7rem;
    font-weight: 700;
}

.reward-purchase-values {
    align-items: flex-end;
    flex-wrap: wrap;
    color: #6f7b76;
    font-size: 0.8rem;
}

.reward-purchase-values b {
    display: block;
    margin-top: 3px;
    color: #274d44;
    font-size: 0.94rem;
}

.reward-activity-card {
    padding: 16px 18px;
}

.reward-activity-title {
    min-width: 0;
}

.reward-activity-title strong {
    display: block;
    margin-bottom: 3px;
    overflow-wrap: anywhere;
}

.reward-activity-amount {
    flex: 0 0 auto;
    color: #176c43;
    font-weight: 800;
}

.reward-activity-amount.is-negative {
    color: #a74936;
}

.rewards-message {
    padding: 38px 28px;
    text-align: center;
}

.rewards-message-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    place-items: center;
    border-radius: 50%;
    background: #eef3ef;
    color: #31564d;
    font-size: 1.25rem;
}

.rewards-message h2,
.rewards-message h3 {
    margin: 0 0 8px;
}

.rewards-message p,
.rewards-empty {
    margin: 0;
    color: #73807b;
    line-height: 1.55;
}

.rewards-message.is-error {
    border-color: #efc6bd;
    background: #fff7f4;
}

@media (max-width: 760px) {
    .rewards-shell {
        width: min(100% - 24px, 1040px);
        padding: 38px 0 76px;
    }

    .reward-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rewards-purchase-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .rewards-lookup-card,
    .rewards-customer-header,
    .rewards-progress-card,
    .rewards-section,
    .rewards-message {
        border-radius: 18px;
    }

    .rewards-lookup-card {
        padding: 30px 18px;
    }

    .rewards-lookup-form {
        flex-direction: column;
    }

    .rewards-phone-field,
    .rewards-lookup-button {
        width: 100%;
        font-size: 16px;
    }

    .rewards-customer-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px 20px;
    }

    .reward-summary-card {
        padding: 16px;
    }

    .rewards-progress-card,
    .rewards-section {
        padding: 22px 20px;
    }

    .reward-activity-card {
        align-items: flex-start;
    }
}

@media (max-width: 360px) {
    .reward-summary-grid {
        grid-template-columns: 1fr;
    }

    .reward-summary-card span {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rewards-phone-field,
    .rewards-lookup-button,
    .rewards-progress-fill {
        transition: none;
    }
}

/* Dynamic rewards results rendered by loyalty-customer.js. */
.rewards-lookup-card > .eyebrow,
.reward-customer-header .eyebrow,
.section-heading .eyebrow,
.next-reward-card .eyebrow {
    margin: 0 0 8px;
    color: #d75f31;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.rewards-lookup-card > p:not(.eyebrow) {
    margin: 18px auto 28px;
    color: #66746f;
    line-height: 1.65;
}

.rewards-lookup-form {
    display: grid;
    max-width: 640px;
    margin: 0 auto;
    gap: 8px;
    text-align: left;
}

.rewards-lookup-form > label {
    color: #294c44;
    font-size: 0.9rem;
    font-weight: 800;
}

.rewards-lookup-form > small {
    color: #78847f;
}

.rewards-lookup-controls {
    display: flex;
    gap: 10px;
}

.rewards-lookup-controls input {
    flex: 1 1 auto;
    min-width: 0;
    height: 54px;
    padding: 0 18px;
    border: 1px solid #cbd3ce;
    border-radius: 14px;
    background: #fff;
    color: #173a33;
    font: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.rewards-lookup-controls input:focus {
    border-color: #1c6a5b;
    box-shadow: 0 0 0 4px rgba(28, 106, 91, 0.12);
}

.rewards-lookup-controls .btn {
    min-height: 54px;
    padding-inline: 24px;
    border-radius: 14px;
    white-space: nowrap;
}

.reward-customer-header,
.next-reward-card,
.rewards-history-section,
.rewards-empty,
.rewards-loading {
    border: 1px solid rgba(18, 53, 46, 0.13);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 55px rgba(28, 45, 39, 0.07);
}

.reward-customer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 28px;
}

.reward-customer-header h2 {
    margin: 0 0 6px;
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(1.65rem, 4vw, 2.35rem);
}

.reward-customer-header p:last-child {
    margin: 0;
    color: #6c7974;
}

.account-status,
.order-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #e4f4e9;
    color: #19633e;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: capitalize;
}

.account-status.inactive,
.account-status.paused,
.account-status.disabled {
    background: #f4e8e5;
    color: #9c3e2c;
}

.reward-summary-grid > article {
    min-width: 0;
    padding: 20px;
    border: 1px solid rgba(18, 53, 46, 0.12);
    border-radius: 18px;
    background: #fff;
}

.reward-summary-grid > article.featured {
    border-color: rgba(215, 95, 49, 0.35);
    background: #fff9f4;
}

.reward-summary-grid article small {
    display: block;
    min-height: 2.4em;
    color: #71807a;
    font-weight: 700;
    line-height: 1.25;
}

.reward-summary-grid article > strong {
    display: block;
    margin-top: 10px;
    color: #123f36;
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(1.45rem, 4vw, 2rem);
}

.next-reward-card,
.rewards-history-section {
    padding: 26px 28px;
}

.next-reward-card h2,
.section-heading h2 {
    margin: 0;
    font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.next-reward-card > p:not(.eyebrow) {
    margin: 10px 0;
    color: #65736e;
    line-height: 1.55;
}

.next-reward-card > small {
    display: block;
    margin-top: 10px;
    color: #78847f;
}

.progress-values {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
}

.progress-values strong {
    color: #123f36;
    font-size: clamp(1.3rem, 4vw, 1.8rem);
}

.progress-values span {
    color: #687670;
    font-size: 0.9rem;
}

.rewards-progress-track > i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #d9743f, #e7a83d);
    transition: width 350ms ease;
}

.section-heading {
    margin-bottom: 18px;
}

.purchase-list,
.activity-list {
    display: grid;
    gap: 12px;
}

.purchase-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.purchase-card,
.activity-card {
    border: 1px solid #e0e5e1;
    border-radius: 16px;
    background: #fbfcfa;
}

.purchase-card {
    padding: 18px;
}

.purchase-card header,
.purchase-card dl > div,
.activity-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.purchase-card header > span:first-child strong,
.purchase-card header > span:first-child small {
    display: block;
}

.purchase-card header small,
.activity-card small {
    margin-top: 4px;
    color: #7a8681;
    font-size: 0.78rem;
}

.purchase-card dl {
    display: grid;
    gap: 9px;
    margin: 18px 0 0;
}

.purchase-card dt {
    color: #6f7b76;
}

.purchase-card dd {
    margin: 0;
    color: #274d44;
    font-weight: 800;
}

.activity-card {
    padding: 16px 18px;
}

.activity-card > span {
    min-width: 0;
}

.activity-card > span strong,
.activity-card > span small {
    display: block;
    overflow-wrap: anywhere;
}

.reward-positive {
    color: #176c43 !important;
}

.reward-negative {
    color: #a74936 !important;
}

.rewards-empty,
.rewards-loading {
    padding: 34px 26px;
    color: #73807b;
    text-align: center;
    line-height: 1.55;
}

.rewards-empty strong {
    display: block;
    margin-bottom: 6px;
    color: #294c44;
    font-size: 1.1rem;
}

.rewards-empty p {
    margin: 0;
}

.rewards-empty.error-state {
    border-color: #efc6bd;
    background: #fff7f4;
}

.rewards-order-link,
.rewards-back-link {
    color: #17473d;
    font-weight: 700;
    text-decoration: none;
}

.rewards-back-link {
    justify-self: start;
    margin: 8px 4px 0;
}

@media (max-width: 760px) {
    .purchase-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .rewards-lookup-controls {
        flex-direction: column;
    }

    .rewards-lookup-controls input,
    .rewards-lookup-controls .btn {
        width: 100%;
        font-size: 16px;
    }

    .reward-customer-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px 20px;
    }

    .next-reward-card,
    .rewards-history-section {
        padding: 22px 20px;
    }

    .progress-values {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rewards-lookup-controls input,
    .rewards-progress-track > i {
        transition: none;
    }
}
