.loyalty-page,.loyalty-panel{max-width:1160px;margin:24px auto;padding:clamp(16px,3vw,40px);color:#633b43;background:#fffaf5;border:1px solid #ead5ca;border-radius:20px}.loyalty-page h1,.loyalty-panel h2{font-family:Georgia,serif;color:#823c49}.loyalty-reward{font-size:clamp(24px,4vw,40px);font-family:Georgia,serif;padding:24px;border-radius:16px;background:#f3e0df}.loyalty-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,350px),1fr));gap:20px}.loyalty-coupon svg{width:100%;height:auto;display:block}.loyalty-panel label,.loyalty-page label{display:block;margin:12px 0}.loyalty-panel input:not([type=checkbox]),.loyalty-panel select,.loyalty-panel textarea,.loyalty-page input{max-width:100%;padding:10px;border:1px solid #c59b99;border-radius:8px;background:white;color:#633b43}.loyalty-panel button,.loyalty-page button,.loyalty-page a.loyalty-button{padding:10px 16px;margin:5px;border:1px solid #ae727d;border-radius:9px;background:#fff5f1;color:#713b49;cursor:pointer}.loyalty-panel button:disabled{opacity:.5;cursor:wait}.loyalty-panel table{width:100%;border-collapse:collapse;font-size:14px}.loyalty-panel td,.loyalty-panel th{padding:10px;text-align:start;border-bottom:1px solid #e4d2c9;vertical-align:top}.loyalty-scroll{overflow:auto}.loyalty-panel details{padding:16px 0;border-bottom:1px solid #e4d2c9}.loyalty-panel summary{font-weight:bold;cursor:pointer}.loyalty-status{white-space:pre-wrap;overflow-wrap:anywhere}.loyalty-preview{max-width:800px}.loyalty-recipient{display:flex!important;gap:10px;align-items:center}.loyalty-panel fieldset{border:1px solid #e4d2c9;border-radius:12px;margin:12px 0;padding:16px}.loyalty-dialog{max-width:650px;width:calc(100% - 32px);max-height:90vh;overflow:auto;border:1px solid #c59b99;border-radius:16px;padding:24px;color:#633b43}.loyalty-dialog::backdrop{background:#3c252877}.loyalty-dialog label{display:block;margin:14px 0}.loyalty-dialog select,.loyalty-dialog input{max-width:100%;padding:10px}.loyalty-dialog button{padding:10px 16px;margin:8px}.loyalty-history{padding:14px;border-bottom:1px solid #e4d2c9}.loyalty-muted{font-size:.9rem;color:#79686a}

.loyalty-body{font-family:system-ui,sans-serif;line-height:1.6}.loyalty-page h1,.loyalty-page h2{margin-bottom:14px}.loyalty-page p{margin:12px 0}.loyalty-page h2{margin-top:25px}.loyalty-page form{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.loyalty-page form label{margin-bottom:5px}

/* Compact cards apply only to the customer's club, never to ADMIN or image exports. */
.loyalty-page .loyalty-grid{grid-template-columns:repeat(3,minmax(0,300px));gap:16px;align-items:stretch;justify-content:start}
.loyalty-page .loyalty-coupon-card{width:100%;min-width:0;border:1px solid #ead5ca;border-radius:12px;background:#fffdf9;overflow:hidden}
.loyalty-page .loyalty-coupon-details{display:grid;gap:3px;padding:8px 14px 13px;overflow-wrap:anywhere;font-size:.875rem;line-height:1.4}
.loyalty-page .loyalty-coupon-details strong{font-size:1rem;color:#813b47}
.loyalty-page .loyalty-coupon-details small{font-size:.75rem;color:#79686a}
.loyalty-body.has-bottom-nav{padding-bottom:calc(6rem + env(safe-area-inset-bottom,0px))}

.loyalty-gift-row{display:flex;gap:18px;align-items:center;padding:12px 0;border-bottom:1px solid #ead5ca;overflow-wrap:anywhere}
.loyalty-panel .loyalty-gift-thumb{flex:0 0 160px;width:160px;max-width:180px;padding:0;margin:0;background:transparent}
.loyalty-gift-row>div{min-width:0}.loyalty-gift-row p{margin:5px 0}.loyalty-promo-link{width:100%;box-sizing:border-box}
.loyalty-promotion{position:relative;z-index:2}.loyalty-promotion a{display:inline-block;padding:10px;color:#713b49;font-weight:bold}
@media(max-width:540px){.loyalty-gift-row{align-items:flex-start;gap:10px}.loyalty-panel .loyalty-gift-thumb{flex-basis:140px;width:140px}.loyalty-gift-row button{max-width:100%;margin:3px 0}}

/* Match the existing checkout modal and loyalty controls, including small screens. */
dialog.loyalty-dialog{position:fixed;inset:0;margin:auto;box-sizing:border-box;width:min(650px,calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);padding:clamp(16px,4vw,24px);background:#fffaf5;box-shadow:0 20px 70px #38233144;overflow-wrap:anywhere}
.loyalty-dialog select,.loyalty-dialog input{box-sizing:border-box;width:100%;min-width:0;border:1px solid #c59b99;border-radius:8px;background:#fff;color:#633b43}
.loyalty-dialog button{max-width:100%;border:1px solid #ae727d;border-radius:12px;background:#fff5f1;color:#713b49;font:inherit;min-height:44px;cursor:pointer;transition:background .15s,border-color .15s}
.loyalty-dialog button:hover,.loyalty-panel button:hover{background:#f3e0df;border-color:#944469}
.loyalty-dialog button:focus-visible,.loyalty-dialog select:focus-visible,.loyalty-dialog input:focus-visible,.loyalty-panel button:focus-visible,.loyalty-panel select:focus-visible{outline:3px solid #aa4d79;outline-offset:3px}
.loyalty-dialog button:disabled{opacity:.5;cursor:wait}

/* Customer coupons share one compact card size and the current page language. */
.loyalty-page .loyalty-coupon-card{max-width:300px;display:flex;flex-direction:column}
.loyalty-page .loyalty-promo-card{grid-column:auto;max-width:300px}
.loyalty-page .loyalty-coupon-card>svg{flex:none;aspect-ratio:1536/850}
@media(max-width:800px){.loyalty-page .loyalty-grid{grid-template-columns:repeat(2,minmax(0,300px))}}
@media(max-width:520px){.loyalty-page .loyalty-grid{grid-template-columns:minmax(0,300px)}}
@media(max-width:400px){.loyalty-page{padding:12px;margin-inline:0}}

/* Only the personal gift editor: no changes to ADMIN width or other forms. */
.loyalty-panel .loyalty-gift-form{display:grid;gap:18px;max-width:760px;min-width:0;padding-top:18px;font-size:1rem;line-height:1.5}
.loyalty-gift-form>*{min-width:0;max-width:100%;box-sizing:border-box}
.loyalty-panel .loyalty-gift-form .loyalty-gift-field{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:0;min-width:0;font-weight:500}
.loyalty-gift-field>span{min-width:0;overflow-wrap:anywhere}
.loyalty-panel .loyalty-gift-form input:not([type=checkbox]),.loyalty-panel .loyalty-gift-form select,.loyalty-panel .loyalty-gift-form textarea{display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;margin:0;padding:11px 12px;border:1px solid #c59b99;border-radius:9px;background:#fffaf5;color:#633b43;font:inherit;line-height:1.5}
.loyalty-panel .loyalty-gift-form textarea{resize:vertical;min-height:112px}
.loyalty-panel .loyalty-gift-form .loyalty-gift-check{display:flex;gap:10px;align-items:flex-start;margin:0;font-weight:400}
.loyalty-gift-check input[type=checkbox]{flex:0 0 auto;width:18px;height:18px;margin:3px 0}
.loyalty-panel .loyalty-gift-variants{padding:0;margin:0;border:0;background:transparent}
.loyalty-panel .loyalty-gift-variants summary{box-sizing:border-box;padding:12px 14px;border:1px solid #ead5ca;border-radius:9px;background:#fff7f1;font-size:1rem;line-height:1.5;overflow-wrap:anywhere}
.loyalty-panel .loyalty-gift-variants[open]>.loyalty-gift-field{margin-top:16px}
.loyalty-panel .loyalty-gift-form fieldset{margin:0;padding:14px;min-width:0}
.loyalty-panel .loyalty-gift-form .loyalty-recipient{margin:10px 0;overflow-wrap:anywhere;font-size:.95rem}
.loyalty-panel .loyalty-gift-form .loyalty-recipient input{flex:0 0 auto}
.loyalty-panel .loyalty-gift-form button{justify-self:start;margin:0;min-height:44px;max-width:100%;white-space:normal;font:inherit;line-height:1.4;overflow-wrap:anywhere}
.loyalty-gift-actions{display:flex;flex-wrap:wrap;gap:10px}
.loyalty-gift-form .loyalty-status:empty{display:none}
.loyalty-gift-form p{margin:0}
.loyalty-gift-form .loyalty-preview:empty{display:none}
@media(max-width:400px){.loyalty-gift-actions{display:grid}.loyalty-gift-actions button{width:100%}}
/* Selected-product promotions are separate from registration coupons. */
.product-promotion-editor{margin-top:20px}
.product-promotion-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:20px 0}
.product-promotion-form label{display:flex;flex-direction:column;gap:7px;margin:0;min-width:0;font:inherit}
.product-promotion-form input{box-sizing:border-box;max-width:100%;width:100%;min-width:0;font:inherit}
.product-promotion-form input[type=checkbox]{width:22px;height:22px}
.product-promotion-found img{width:150px;height:150px;object-fit:contain;display:block;border-radius:14px;margin:12px auto}
.product-promotion-found:empty,.product-promotion-editor .loyalty-preview:empty{display:none}
.product-promotion-row img{width:90px;height:90px;object-fit:contain;float:left;margin:0 16px 12px 0;border-radius:10px}
.product-promotion-row{display:flow-root;overflow-wrap:anywhere}
.product-promotion-row input{box-sizing:border-box;width:100%;min-width:0}
.product-promotion-editor button{min-height:44px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.product-promotion-editor .loyalty-preview{margin:18px 0}
#selected-earring-promotion{margin:20px auto;max-width:900px;box-sizing:border-box}
@media(max-width:600px){.product-promotion-form{grid-template-columns:1fr}.product-promotion-editor .loyalty-gift-actions{display:flex;flex-direction:column}.product-promotion-editor .loyalty-gift-actions>*{width:100%;box-sizing:border-box}}
.product-promotion-history{margin-top:20px}
.product-promotion-card-actions{clear:both;align-items:center;margin-top:16px}
.product-promotion-card-actions select{width:auto;max-width:100%;min-height:44px}
.product-promotion-card-actions button:disabled{opacity:.5;cursor:not-allowed}
.product-promotion-row>.loyalty-preview{clear:both}
.product-promotion-history .product-promotion-row{font-size:.95rem}
@media(max-width:600px){.product-promotion-card-actions>*{width:100%;box-sizing:border-box}}
.product-promotion-card-actions button,.product-promotion-editor>.loyalty-gift-actions>button{box-sizing:border-box;margin:0;min-width:0}
.registered-customers{margin-top:24px;min-width:0}.registered-customers-table{width:100%;border-collapse:collapse;table-layout:fixed}.registered-customers-table caption{text-align:left;font-weight:700;padding:12px 0}.registered-customers-table th,.registered-customers-table td{text-align:left;padding:12px 10px;border-bottom:1px solid #ead5ca;vertical-align:top;overflow-wrap:anywhere}.registered-customers-table th{background:#f3e0df}.registered-customers-table th:nth-child(3){width:35%}
@media(max-width:600px){.registered-customers-table thead{display:none}.registered-customers-table,.registered-customers-table tbody,.registered-customers-table tr{display:block;width:100%;box-sizing:border-box}.registered-customers-table tr{margin:12px 0;border:1px solid #ead5ca;border-radius:12px;padding:8px;background:#fffdf9}.registered-customers-table td{display:grid;grid-template-columns:minmax(80px,30%) minmax(0,1fr);gap:8px;padding:8px 6px;border:0}.registered-customers-table td::before{content:attr(data-label);font-weight:600;overflow-wrap:normal}}
@media(max-width:600px){.registered-customers-table caption{display:block;width:100%;box-sizing:border-box}}
@media(max-width:600px){.product-promotion-card-actions{align-items:stretch}.product-promotion-card-actions select{width:100%;box-sizing:border-box}}

/* Verification recovery stays compact and uses the shop's existing colors. */
.email-verification-notice{box-sizing:border-box;margin:12px 0;padding:12px 16px;border:1px solid #ead5ca;border-radius:12px;color:#633b43;background:#fffaf5;font-size:.9rem;line-height:1.5;overflow-wrap:anywhere}
.email-verification-notice p{margin:0 0 8px}.email-verification-notice p:empty{display:none}
.email-verification-notice button{box-sizing:border-box;max-width:100%;margin:4px;padding:9px 12px;border:1px solid #ae727d;border-radius:9px;background:#fff5f1;color:#713b49;font:inherit;cursor:pointer;white-space:normal}
.email-verification-notice [hidden]{display:none!important}.email-verification-notice--compact p{margin:0}

.loyalty-distribution-dialog{width:min(56rem,94vw);max-height:90vh;overflow:auto;border:1px solid #b55b78;border-radius:1rem;padding:1.25rem;background:#fff;color:#262026}
.loyalty-distribution-dialog::backdrop{background:rgba(0,0,0,.4)}
.loyalty-distribution-dialog label{display:block;margin:.65rem 0;font-size:1rem}
.loyalty-distribution-dialog input[type=checkbox]{margin-right:.5rem}
.loyalty-distribution-dialog button{margin:.4rem;padding:.6rem .9rem;min-height:2.75rem}
.loyalty-distribution-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;padding:.75rem;background:#faf3f6}
.loyalty-distribution-dialog details{margin:.65rem 0;padding:.5rem;border:1px solid #e0ccd3}
.loyalty-distribution-dialog summary{cursor:pointer;overflow-wrap:anywhere}
