/* Membership administration, following the current application theme. */
.ma-status{display:inline-flex;align-items:center;gap:4px;padding:2px 7px;border-radius:5px;font-size:12px;font-weight:600;line-height:1.6;white-space:nowrap}.ma-active{color:var(--green);background:var(--soft)}.ma-soon{color:#91600e;background:#fff3d7}.ma-expired{color:#a34242;background:#faeaea}.ma-exempt{color:#546880;background:#eef2f7}.ma-account-membership{margin-top:5px;display:flex;align-items:flex-start;flex-direction:column;gap:2px}.ma-account-membership small{font-size:11px!important;margin:0!important}.ma-renew-button{white-space:nowrap}.ma-summary-block{margin:10px 0 14px;border:1px solid var(--line);border-radius:9px;background:var(--surface);padding:10px 12px}.ma-membership-title,.ma-codes-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.ma-membership-title h2,.ma-codes-heading h2{font-size:16px;margin:0;color:var(--deep)}.ma-membership-title p,.ma-codes-heading p{font-size:12px;color:var(--muted);margin:3px 0 0}.ma-mini-stats{display:flex;flex-wrap:wrap;gap:8px 18px;align-items:center;border-top:1px solid var(--line);padding-top:8px;margin-top:8px;font-size:13px;color:var(--muted)}.ma-mini-stats strong{margin-left:5px;color:var(--deep);font-size:16px}.ma-transition{margin-left:auto;font-size:11px}.ma-dialog{width:min(540px,calc(100% - 24px));max-width:none;max-height:calc(100dvh - 32px);overflow:auto;border:1px solid var(--line);padding:20px;border-radius:15px;background:#fff;color:var(--ink);box-shadow:0 18px 80px #132b2533}.ma-dialog::backdrop{background:rgba(18,32,24,.5)}.ma-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:13px}.ma-dialog-head h2{font-size:20px;color:var(--deep);line-height:1.4;margin:2px 0 0}.ma-eyebrow{font-size:11px;letter-spacing:1px;color:var(--green)}.ma-dialog-head .icon-button{font-size:24px;line-height:1;background:var(--paper);color:var(--muted);border:0;border-radius:8px;width:32px;height:32px;flex:none}.ma-target{display:flex;gap:9px;align-items:center;padding:10px 11px;background:var(--paper);border:1px solid var(--line);border-radius:9px;margin-bottom:13px}.ma-avatar{display:grid;place-items:center;width:34px;height:34px;flex:none;border-radius:9px;background:var(--soft);color:var(--green);font-weight:700}.ma-target>div{flex:1;min-width:0}.ma-target strong{display:block;font-size:14px;overflow-wrap:anywhere}.ma-target small{display:block;font-size:11px;color:var(--muted);margin-top:2px}.ma-form{display:grid;gap:10px}.ma-form>label,.ma-gift-days{font-size:13px;font-weight:600;display:grid;gap:5px}.ma-form input:not([type=radio]){width:100%;box-sizing:border-box;min-height:35px;font-size:14px;padding:7px 10px}.ma-required{font-size:11px;font-weight:400;color:var(--muted)}.ma-plan-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.ma-plan-options:not(:has(.ma-plan:nth-child(4))){grid-template-columns:repeat(3,minmax(0,1fr))}.ma-plan{position:relative;cursor:pointer;min-width:0}.ma-plan input{position:absolute;width:1px;height:1px;opacity:0}.ma-plan>span{display:flex;min-height:56px;flex-direction:column;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:8px;font-size:14px;line-height:1.5;background:#fff}.ma-plan small{display:block;font-size:12px;color:var(--muted);font-weight:400}.ma-plan:has(input:checked)>span{border-color:var(--green);background:var(--soft);color:var(--green);box-shadow:inset 0 0 0 1px var(--green)}.ma-plan:has(input:focus-visible)>span{outline:3px solid var(--green);outline-offset:3px}.ma-expiry-preview{display:grid;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr);align-items:center;gap:8px;border-radius:9px;background:var(--paper);padding:12px}.ma-expiry-preview>div{min-width:0}.ma-expiry-preview span:not(.ma-expiry-arrow){font-size:12px;color:var(--muted);display:block}.ma-expiry-preview strong{font-size:14px;line-height:1.55;display:block;margin-top:4px;overflow-wrap:anywhere}.ma-expiry-preview>div:nth-child(3) strong{color:var(--green)}.ma-expiry-arrow{font-size:20px;color:var(--green);text-align:center}.ma-expiry-preview p{grid-column:1/-1;color:var(--muted);font-size:11px;line-height:1.5;margin:3px 0 0}.ma-demo-note,.ma-preserve-note{font-size:12px;line-height:1.65;margin:0;color:var(--muted)}.ma-demo-note{background:#fff8e8;border-radius:6px;padding:6px 9px;color:#795d26}.ma-demo-note strong{font-family:ui-monospace,monospace}.ma-preserve-note{padding-left:9px;border-left:2px solid var(--line)}.ma-dialog-actions{display:flex;justify-content:flex-end;gap:8px;align-items:center;flex-wrap:wrap;margin-top:5px}.ma-revoke-link{font-size:12px!important;color:#ad5050!important;margin-right:auto;padding-left:0!important}.ma-dialog .error:empty{display:none}.ma-dialog .error{font-size:13px;margin:0}.ma-revoke-warning{font-size:14px;line-height:1.7;margin:0 0 14px}.ma-danger{background:#a94b4b!important;color:#fff!important}.ma-heading-actions{display:flex;gap:7px}.ma-code-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:15px 0}.ma-code-stats article{background:var(--paper);border:1px solid var(--line);border-radius:9px;padding:10px 13px;display:flex;align-items:center;justify-content:space-between;gap:8px}.ma-code-stats span{font-size:13px;color:var(--muted)}.ma-code-stats strong{font-size:23px;line-height:1.2;color:var(--deep)}.ma-code-filter{display:flex;gap:12px;align-items:center;justify-content:space-between;font-size:12px;color:var(--muted);margin-bottom:9px}.ma-code-filter label{display:flex;gap:7px;align-items:center}.ma-code-filter select{font-size:13px;min-height:31px;padding:5px 8px}.ma-code-row{display:grid;grid-template-columns:minmax(150px,1fr) 72px minmax(180px,1.2fr) 50px;gap:10px;padding:11px 4px;align-items:center;border-bottom:1px solid var(--line);font-size:13px}.ma-code-row code{font-family:ui-monospace,Consolas,monospace;font-weight:700;font-size:14px;overflow-wrap:anywhere}.ma-code-value{min-width:0}.ma-code-value small,.ma-code-date small{display:block;font-size:11px;color:var(--muted);margin-top:3px;overflow-wrap:anywhere}.ma-code-date span{font-size:12px;color:var(--muted)}.ma-code-row>.ma-status{justify-self:start}.ma-code-row .secondary{padding:4px 8px!important;min-height:29px!important;font-size:12px!important}.ma-code-done{text-align:center;color:var(--muted)}.ma-audit-details{margin-top:20px;border:1px solid var(--line);border-radius:9px;overflow:hidden}.ma-audit-details summary{padding:10px 12px;font-size:14px;font-weight:600;background:var(--surface);cursor:pointer}.ma-audit-details summary>span{font-size:12px;font-weight:400;margin-left:7px;color:var(--muted)}.ma-audit-list{padding:0 12px;max-height:285px;overflow:auto}.ma-audit-list article{padding:10px 0;border-top:1px solid var(--line)}.ma-audit-list article:first-child{border-top:0}.ma-audit-list article>div{display:flex;align-items:center;flex-wrap:wrap;gap:7px;font-size:12px}.ma-audit-list strong{font-size:13px;color:var(--deep)}.ma-audit-list time{margin-left:auto;font-size:11px;color:var(--muted)}.ma-audit-list p{margin:4px 0 0;color:var(--muted);font-size:12px;overflow-wrap:anywhere}.ma-code-policy{margin:14px 0 0;font-size:12px;color:var(--muted);line-height:1.7}.ma-empty{padding:26px;text-align:center;color:var(--muted);font-size:14px}.ma-once-warning{font-size:13px;line-height:1.7;background:#fff4df;color:#805c24;padding:10px 12px;border-radius:8px;margin:0 0 12px}.ma-generated-codes{width:100%;box-sizing:border-box;resize:vertical;min-height:110px;max-height:45dvh;padding:10px!important;line-height:1.9!important;font-size:14px!important;font-family:ui-monospace,Consolas,monospace!important;background:var(--surface)!important;white-space:pre;overflow:auto}.ma-generated-status{font-size:13px;color:var(--green);min-height:18px;margin:5px 0}.ma-dialog [hidden]{display:none!important}
@media(max-width:700px){.ma-summary-block{padding:9px}.ma-membership-title{align-items:flex-start}.ma-membership-title p{max-width:220px}.ma-mini-stats{gap:7px 14px}.ma-transition{width:100%;margin-left:0}.ma-codes-heading{align-items:flex-start;flex-wrap:wrap}.ma-codes-heading p{font-size:12px}.ma-code-stats{gap:6px;margin:12px 0}.ma-code-stats article{padding:9px;gap:4px}.ma-code-stats strong{font-size:20px}.ma-code-stats span{font-size:12px}.ma-code-filter{flex-wrap:wrap;gap:5px}.ma-code-row{grid-template-columns:minmax(0,1fr) auto 43px;gap:7px;padding:10px 0}.ma-code-row .ma-code-value{grid-column:1;grid-row:1}.ma-code-row>.ma-status{grid-column:2;grid-row:1}.ma-code-row .ma-code-date{grid-column:1/3;grid-row:2}.ma-code-row .ma-code-date span,.ma-code-row .ma-code-date small{display:inline;font-size:11px}.ma-code-row .ma-code-date small{margin-left:5px}.ma-code-row>button,.ma-code-row>.ma-code-done{grid-column:3;grid-row:1/3}.ma-audit-list time{width:100%;margin-left:0}.ma-dialog{padding:15px;max-height:calc(100dvh - 20px);border-radius:12px}.ma-dialog-head h2{font-size:19px}.ma-target{padding:9px}.ma-target>.ma-status{font-size:11px;max-width:115px;white-space:normal}.ma-plan-options{gap:5px}.ma-plan>span{font-size:13px;min-height:52px}.ma-plan small{font-size:11px}.ma-expiry-preview{padding:10px;gap:4px;grid-template-columns:minmax(0,1fr) 19px minmax(0,1fr)}.ma-expiry-preview strong{font-size:13px}.ma-dialog-actions{gap:6px}.ma-revoke-link{flex-basis:100%;text-align:left;min-height:24px!important}.ma-generated-codes{font-size:12px!important}.ma-code-value code{font-size:13px}}
@media(prefers-reduced-motion:reduce){.ma-dialog *, .ma-dialog{scroll-behavior:auto;transition:none!important}}

/* First release: stacked terms and optional manual payment records. */
.ma-inactive{color:var(--muted);background:var(--paper);border:1px solid var(--line)}
.ma-dialog{box-sizing:border-box;scroll-padding-block:15px}
.ma-form{min-width:0}
.ma-plan-fieldset{border:0;padding:0;margin:0;min-width:0}
.ma-plan-fieldset legend{font-size:13px;font-weight:600;margin-bottom:6px;padding:0}
.ma-plan>span{min-height:73px}
.ma-plan small:last-child{color:var(--green)}
.ma-gift-plan>span{border-style:dashed}
.ma-form .ma-quantity-field,.ma-form .ma-gift-days{display:grid;gap:5px}
.ma-form .ma-quantity-field input,.ma-form .ma-gift-days input{max-width:130px}
.ma-field-hint{display:block;font-size:12px;font-weight:400;line-height:1.6;color:var(--muted);margin:0}
.ma-order-summary{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;border-block:1px solid var(--line);padding:10px 0}
.ma-order-summary>div{min-width:0}
.ma-order-summary span{font-size:12px;color:var(--muted);display:block}
.ma-order-summary strong{display:block;font-size:16px;line-height:1.5;color:var(--deep);overflow-wrap:anywhere;margin-top:2px}
.ma-order-summary>div:last-child strong{color:var(--green)}
.ma-payment{border:1px solid var(--line);background:var(--surface);padding:10px;border-radius:8px;min-width:0}
.ma-payment .ma-payment-toggle{display:flex;gap:7px;align-items:flex-start;font-size:13px;font-weight:600;cursor:pointer;min-height:24px}
.ma-form .ma-payment-toggle input[type=checkbox]{width:17px;height:17px;min-height:17px;flex:none;margin:2px 0 0;padding:0;accent-color:var(--green)}
.ma-payment-toggle small{font-size:12px;font-weight:400;color:var(--muted);margin-left:4px}
.ma-payment>.ma-field-hint{margin-top:4px}
.ma-payment-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px;margin-top:10px;padding-top:9px;border-top:1px solid var(--line);min-width:0}
.ma-payment-fields label{display:grid;gap:5px;font-size:12px;font-weight:600;min-width:0}
.ma-payment-fields select{min-width:0;max-width:100%;width:100%;font-size:14px;min-height:35px;box-sizing:border-box}
.ma-payment-reference{grid-column:1/-1}
.ma-payment-reference .ma-required{display:inline}
.ma-field-error{color:#a34242;font-size:12px;font-weight:400;line-height:1.5}
.ma-field-error:empty{display:none}
.ma-dialog :is(input,select,button):focus-visible{outline:2px solid var(--green);outline-offset:2px}
.ma-dialog .error:focus{outline:2px solid var(--green);outline-offset:3px}
@media(max-width:700px){
 .ma-dialog{width:calc(100% - 20px);padding:13px}
 .ma-plan-options{grid-template-columns:repeat(2,minmax(0,1fr))}
 .ma-plan-options:not(:has(.ma-plan:nth-child(4))){grid-template-columns:repeat(3,minmax(0,1fr))}
 .ma-plan>span{min-height:66px}
 .ma-plan small{font-size:12px}
 .ma-order-summary{gap:6px;padding:9px 0}
 .ma-order-summary strong{font-size:14px}
 .ma-order-summary span{font-size:11px}
 .ma-dialog-head .icon-button{width:40px;height:40px}
 .ma-form input:not([type=radio]):not([type=checkbox]),.ma-payment-fields select{min-height:40px}
 .ma-payment-toggle{padding-block:3px}
 .ma-dialog-actions :is(.primary,.secondary){min-height:40px}
 .ma-payment{padding:8px}
}
@media(max-width:350px){.ma-payment-fields{grid-template-columns:minmax(0,1fr)}.ma-payment-reference{grid-column:1}}

.ma-code-pager{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:10px;margin-top:12px;font-size:12px;color:var(--muted)}
