/* Gestion Verde member card, adapted to the app's existing data and actions. */
.workspace:has(#customer-detail-view:not(.hidden)) {
  max-width: 1480px;
  padding: 28px clamp(16px, 3vw, 44px);
}
#customer-detail-view { padding: 0; background: none; }
#customer-detail { --card-green: #88c426; --card-teal: #3c8687; --card-pale: #ecffe1; gap: 22px; font-family: Arial, Helvetica, sans-serif; color: #323232; }
#customer-detail .member-card {
  position: relative;
  background: var(--card-pale);
  border: 1px solid #a8c992;
  border-radius: 6px;
  box-shadow: 0 3px 10px #28472412;
  backdrop-filter: none;
  color: #323232;
  font-family: inherit;
  overflow: visible;
}
.member-note-trigger { position: absolute; z-index: 3; top: 10px; right: -58px; display: grid; place-items: center; width: 58px; height: 58px; min-height: 58px; padding: 0; border: 0; border-radius: 0 12px 12px 0; background: #88c426; color: white; font-size: 34px; box-shadow: 0 6px 14px #173d2c38; }
.member-note-trigger.has-note::after { content: ""; position: absolute; top: 7px; right: 7px; width: 11px; height: 11px; border: 2px solid white; border-radius: 50%; background: #f0b52f; }
#member-note-dialog { box-sizing: border-box; width: min(720px, calc(100vw - 32px)); min-height: 500px; max-height: 90dvh; padding: 0; overflow: hidden; border: 4px solid #3c8687; border-radius: 10px; background: #ecffe1; color: #3c8687; }
#member-note-dialog::backdrop { background: #16342e88; }
#member-note-form { display: grid; grid-template-rows: auto minmax(300px, 1fr) auto; min-height: 492px; }
.member-note-head { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 54px 10px 14px; background: #88c426; }
.member-note-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; color: white; font-size: 20px; white-space: nowrap; }
.member-note-head h2 span { display: grid; place-items: center; width: 42px; height: 42px; border: 2px solid white; border-radius: 4px; font-size: 28px; }
.member-note-head label { display: flex; align-items: center; gap: 8px; min-width: 0; color: #246f70; font-size: 16px; }
.member-note-head input { flex: 0 0 30px; width: 30px; height: 30px; margin: 0; accent-color: #3c8687; }
.member-note-save { min-height: 44px; padding: 8px 15px; border: 0; border-radius: 4px; background: white; color: #345f60; font-size: 16px; }
#member-note-close { position: absolute; top: -3px; right: -3px; display: grid; place-items: center; width: 46px; height: 46px; min-height: 46px; padding: 0; border: 3px solid #3c8687; border-radius: 50%; background: white; color: #3c8687; font-size: 30px; line-height: 1; }
#member-note-text { box-sizing: border-box; width: 100%; min-height: 340px; padding: 18px; resize: vertical; border: 0; border-radius: 0; background: #ecffe1; color: #244f50; font: 18px/1.5 Arial, sans-serif; outline-offset: -3px; }
#member-note-feedback { min-height: 24px; margin: 0; padding: 8px 14px; color: #285e5f; font-size: 15px; }
@media (max-width: 900px) {
 .member-note-trigger { top: 8px; right: 8px; width: 50px; height: 50px; min-height: 50px; border-radius: 10px; }
 .member-note-head { grid-template-columns: minmax(0, 1fr); padding: 12px 58px 12px 12px; }
 .member-note-head h2 { white-space: normal; }
 .member-note-save { justify-self: start; }
}
#customer-detail .member-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  grid-template-areas: "identity actions" "fields actions";
  align-items: start;
  gap: 22px 30px;
  padding: 24px;
}
#customer-detail .member-top-left {
  grid-area: identity;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
#customer-detail .member-photo-panel { width: 200px; border: 0; border-radius: 0; background: none; overflow: hidden; box-shadow: none; }
#customer-detail #detail-photo { width: 200px; height: 150px; }
#customer-detail .avatar.card { box-sizing: border-box; width: 200px; height: 150px; border: 1px solid #b0c69e; border-radius: 0; background: #d8e8ce; color: #3c8687; font-size: 48px; }
#customer-detail .avatar.card img { object-fit: cover; }
#customer-detail .photo-action { display: block; width: 100%; min-height: 30px; margin: 4px 0 0; padding: 5px 8px; border: 0; border-radius: 3px; background: #519548; color: white; font-size: 13px; font-weight: 400; box-shadow: none; }
#customer-detail .member-summary { padding-top: 4px; min-width: 0; }
#customer-detail .member-summary p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 8px; min-height: 28px; margin: 0; color: #323232; font-size: 15px; line-height: 1.5; }
#customer-detail .member-summary p span { color: inherit; font-size: inherit; font-weight: 400; }
#customer-detail .member-summary p strong { font-size: inherit; font-weight: 700; color: #323232; }
#customer-detail .member-summary .membership-number { font-size: 19px; margin-bottom: 8px; }
#customer-detail .member-summary .membership-number strong { font-size: 24px; }
#customer-detail .member-summary .consumption-limit { align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
#customer-detail #detail-monthly-max .inline-edit-input { width: 64px; height: 30px; min-height: 30px; padding: 3px 5px; border: 1px solid #a9bf9b; border-radius: 2px; background: #fff; font-size: 16px; color: #323232; }
#customer-detail .member-registration { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 12px; }
#customer-detail .member-registration p { font-size: 13px; }
#customer-detail #detail-expires { color: #c73930; }
#customer-detail .member-flags { margin-top: 10px; }
#customer-detail .member-flags .badge { min-height: 24px; font-size: 11px; }
#customer-detail .member-edit-panel { grid-area: fields; display: block; min-width: 0; }
#customer-detail .member-inline-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 0; }
#customer-detail .member-inline-fields > div,
#customer-detail .member-inline-fields > div.wide { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 10px; align-items: center; min-width: 0; }
#customer-detail .member-inline-fields > div.wide { grid-column: 1 / -1; }
#customer-detail .member-inline-fields dt { margin: 0; text-align: right; font-size: 14px; font-weight: 400; line-height: 1.3; color: #323232; }
#customer-detail .member-inline-fields dd { margin: 0; min-width: 0; font-size: 15px; }
#customer-detail .member-inline-fields .inline-edit-input { box-sizing: border-box; width: 100%; height: 34px; min-height: 34px; padding: 5px 8px; border: 1px solid #a8bf97; border-radius: 3px; background: #fff; color: #323232; font-family: inherit; font-size: 15px; font-weight: 400; box-shadow: inset 0 1px 2px #00000005; }
#customer-detail .member-inline-fields .inline-edit-textarea { height: 48px; min-height: 48px; resize: vertical; }
#customer-detail .member-side-panel { grid-area: actions; display: flex; flex-direction: column; align-self: stretch; align-items: stretch; gap: 22px; min-width: 0; padding: 0; }
#customer-detail .member-extra-settings { position: relative; align-self: stretch; }
#customer-detail .extra-settings-button { display: block; box-sizing: border-box; width: 100%; margin: 0; padding: 11px 14px; min-height: 42px; border: 1px solid var(--card-teal); border-radius: 4px; background: var(--card-teal); color: #fff; font-size: 17px; font-weight: 400; text-align: center; cursor: pointer; box-shadow: none; list-style: none; }
#customer-detail .extra-settings-button::-webkit-details-marker { display: none; }
#customer-detail .extra-settings-button::after { content: " ▾"; font-size: 13px; }
#customer-detail .member-extra-settings[open] .extra-settings-button::after { content: " ▴"; }
#customer-detail .member-extra-actions { position: absolute; inset: calc(100% + 4px) 0 auto; z-index: 5; display: grid; gap: 6px; padding: 10px; background: #fff; border: 1px solid var(--card-teal); border-radius: 4px; box-shadow: 0 6px 18px #203f3226; }
#customer-detail .member-extra-actions button { width: 100%; margin: 0; padding: 8px 10px; min-height: 36px; border: 1px solid #a8c992; border-radius: 3px; background: #ecffe1; color: #326d6d; font-size: 13px; font-weight: 400; }
#customer-detail .member-side-content { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: start; gap: 18px; margin-top: 14px; }
#customer-detail .member-qr-panel { display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; }
#customer-detail .member-qr-panel > span { color: var(--card-teal); font-size: 12px; }
#customer-detail .member-qr-code { box-sizing: border-box; display: grid; place-items: center; width: 120px; height: 120px; min-height: 120px; border: 0; border-radius: 0; background: #fff; padding: 5px; overflow: hidden; }
#customer-detail .member-qr-code img, #customer-detail .member-qr-code canvas { max-width: 100%; max-height: 100%; width: 110px; height: 110px; }
#customer-detail .wallet-panel { align-self: start; display: block; min-width: 0; margin: 0; padding: 10px 8px; border: 2px solid var(--card-teal); border-radius: 5px; background: #e3f5d5; color: var(--card-teal); text-align: center; box-shadow: none; }
#customer-detail .wallet-kicker { color: var(--card-teal); font-size: 20px; font-weight: 400; text-transform: none; letter-spacing: 0; }
#customer-detail .wallet-total { display: block; margin: 5px 0 12px; }
#customer-detail .wallet-total strong { color: var(--card-teal); font-size: 30px; font-weight: 700; letter-spacing: -.5px; overflow-wrap: anywhere; }
#customer-detail .wallet-actions.inline { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
#customer-detail .wallet-actions button { min-height: 28px; padding: 5px 7px; border: 0; border-radius: 3px; font-size: 12px; font-weight: 400; }
#customer-detail .wallet-actions .primary { background: #519548; }
#customer-detail .wallet-actions .danger { background: #b04b3f; }
#customer-detail .member-alert { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px; border: 1px solid #ddc46a; border-radius: 4px; background: #fff9d9; font-size: 13px; color: #876319; box-shadow: none; }
#customer-detail .member-alert span { font-size: 23px; }
#customer-detail .member-alert strong { font-size: 13px; font-weight: 400; }
#customer-detail .member-update-button { align-self: stretch; width: 100%; min-height: 46px; margin: auto 0 0; padding: 10px 18px; border: 0; border-radius: 4px; background: var(--card-green); color: #fff; font-size: 21px; font-weight: 400; box-shadow: none; }
#customer-detail .member-update-button:hover { background: #77b01e; }
#customer-detail .member-card-footer { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; border-top: 1px solid #9cc980; }
#customer-detail .member-card-footer .documents { display: flex; flex-wrap: wrap; gap: 14px 24px; padding: 14px 24px; background: #d8edc2; }
#customer-detail .member-card-footer .documents strong { padding: 8px 12px; border: 2px solid var(--card-teal); border-radius: 4px; background: var(--card-pale); color: var(--card-teal); font-size: 17px; font-weight: 400; }
#customer-detail .document-action { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 4px 0; border: 0; border-radius: 0; background: transparent; color: #323232; font-size: 14px; font-weight: 400; }
#customer-detail .document-action::before { content: "○"; color: #b75142; font-size: 21px; font-weight: bold; }
#customer-detail .document-action.ok::before { content: "✓"; color: #43852a; }
#customer-detail .document-action:hover { text-decoration: underline; }
#customer-detail .member-card-footer .member-bottom-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; margin: 0; gap: 14px; padding: 12px 24px; background: #e5f5d7; border-radius: 0 0 6px 6px; }
#customer-detail #detail-fee-status { margin-right: auto; color: #427939; font-size: 13px; font-weight: 400; }
#customer-detail #detail-renew-button { min-height: 32px; padding: 6px 14px; border: 0; border-radius: 3px; background: var(--card-teal); font-size: 14px; font-weight: 400; }
#customer-detail .history-section { overflow: hidden; gap: 0; border: 1px solid #a8c992; border-radius: 4px; background: #f5ffef; box-shadow: none; }
#customer-detail .history-section h2 { margin: 0; padding: 11px 18px; background: var(--card-teal); color: #fff; font-family: inherit; font-size: 19px; font-weight: 400; }
#customer-detail .history-section .table-wrap { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
#customer-detail .history-section th { background: #d8edc2; color: #346b61; font-size: 13px; padding: 10px 16px; }
#customer-detail .history-section td { background: #f5ffef; border-color: #d7e7cb; font-size: 13px; padding: 12px 16px; }
#customer-detail button:focus-visible, #customer-detail summary:focus-visible, #customer-detail input:focus-visible, #customer-detail textarea:focus-visible { outline: 2px solid #3c8687; outline-offset: 3px; }
@media (max-width: 1150px) {
  #customer-detail .member-card-main { grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; padding: 20px; }
  #customer-detail .member-top-left { grid-template-columns: 160px minmax(0, 1fr); gap: 16px; }
  #customer-detail .member-photo-panel, #customer-detail #detail-photo, #customer-detail .avatar.card { width: 160px; }
  #customer-detail #detail-photo, #customer-detail .avatar.card { height: 120px; }
  #customer-detail .member-inline-fields { gap: 10px; }
  #customer-detail .member-inline-fields > div, #customer-detail .member-inline-fields > div.wide { grid-template-columns: 76px minmax(0, 1fr); gap: 8px; }
  #customer-detail .member-inline-fields dt { font-size: 12px; }
  #customer-detail .member-side-content { grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
  #customer-detail .member-qr-code { width: 110px; height: 110px; min-height: 110px; }
  #customer-detail .wallet-total strong { font-size: 26px; }
}
@media (max-width: 900px) {
  #customer-detail .member-card-main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "identity" "fields" "actions"; }
  #customer-detail .member-top-left { grid-template-columns: 200px minmax(0, 1fr); }
  #customer-detail .member-photo-panel, #customer-detail #detail-photo, #customer-detail .avatar.card { width: 200px; }
  #customer-detail #detail-photo, #customer-detail .avatar.card { height: 150px; }
  #customer-detail .member-side-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; }
  #customer-detail .member-side-content { grid-column: 1; grid-row: 1 / span 3; margin: 0; }
  #customer-detail .member-extra-settings, #customer-detail .member-alert, #customer-detail .member-update-button { grid-column: 2; }
  #customer-detail .member-update-button { margin-top: 0; }
}
@media (max-width: 600px) {
  .workspace:has(#customer-detail-view:not(.hidden)) { padding: 18px 12px; }
  #customer-detail .member-card-main { padding: 16px; }
  #customer-detail .member-top-left { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; }
  #customer-detail .member-photo-panel, #customer-detail #detail-photo, #customer-detail .avatar.card { width: 110px; }
  #customer-detail #detail-photo, #customer-detail .avatar.card { height: 100px; }
  #customer-detail .member-summary { padding: 0; }
  #customer-detail .member-summary .membership-number { font-size: 13px; }
  #customer-detail .member-summary .membership-number strong { font-size: 20px; }
  #customer-detail .member-summary p, #customer-detail .member-registration p { font-size: 12px; }
  #customer-detail .member-registration { margin-top: 6px; gap: 0; }
  #customer-detail .member-inline-fields { grid-template-columns: minmax(0, 1fr); }
  #customer-detail .member-inline-fields > div, #customer-detail .member-inline-fields > div.wide { grid-template-columns: 80px minmax(0, 1fr); }
  #customer-detail .member-inline-fields .inline-edit-input { font-size: 16px; min-height: 38px; }
  #customer-detail .member-side-panel { display: flex; gap: 16px; }
  #customer-detail .member-side-content { grid-template-columns: 120px minmax(0, 1fr); gap: 20px; }
  #customer-detail .member-card-footer .documents { padding: 14px 16px; gap: 10px 18px; }
  #customer-detail .member-card-footer .documents strong { width: 100%; }
  #customer-detail .member-card-footer .member-bottom-actions { padding: 12px 16px; }
}
/* Override the older pill treatments inside the document strip. */
#customer-detail .member-card-footer .document-action { border-radius: 0; background: transparent; box-shadow: none; }
#customer-detail #detail-renew-button { color: #fff; }

/* Final reference proportions: a single compact green panel with teal bands. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* Use the available space on register displays so text and controls stay legible. */
.workspace:has(#customer-detail-view:not(.hidden)) {
  box-sizing: border-box;
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding: 10px 24px 32px;
}
#customer-detail { --card-pale: #d3f19a; gap: 0; background: var(--card-pale); border: 1px solid #7bae9b; }
#customer-detail .member-card { background: var(--card-pale); border: 0; border-radius: 0; box-shadow: none; }
#customer-detail .member-card-main { grid-template-columns: minmax(0, 1.5fr) minmax(290px, 1fr); grid-template-areas: "identity actions" "fields actions"; gap: 12px 16px; padding: 10px 10px 18px; }
#customer-detail .member-top-left { grid-template-columns: 170px minmax(0, 1fr); gap: 8px; }
#customer-detail .member-photo-panel { position: relative; width: 170px; height: 132px; overflow: hidden; background: #3c8687; }
#customer-detail #detail-photo, #customer-detail #detail-photo .avatar.card { width: 170px; height: 132px; min-height: 0; border-radius: 0; border: 0; background: #82bfa0; color: white; }
#customer-detail .photo-action { position: absolute; bottom: 0; left: 9px; width: calc(100% - 18px); min-height: 32px; margin: 0; padding: 5px 6px; font-size: 14px; border-radius: 2px; }
#customer-detail .member-summary { padding: 0; }
#customer-detail .member-summary p, #customer-detail .member-summary .membership-number { min-height: 28px; margin: 0; font-size: 16px; line-height: 1.3; color: #43868a; gap: 4px; }
#customer-detail .member-summary p strong, #customer-detail .member-summary .membership-number strong { color: inherit; font-size: inherit; font-weight: 400; }
#customer-detail .member-summary .consumption-limit { margin: 0; gap: 3px; }
#customer-detail #detail-monthly-max .inline-edit-input { width: 78px; min-height: 22px; height: 22px; border: 0; border-radius: 2px; background: #3c3c3c; color: #fff; padding: 2px 4px; font-size: 14px; }
#customer-detail .member-summary p:has(#detail-sponsor) { width: fit-content; background: #b9ddab; padding: 3px; }
#customer-detail .member-registration { gap: 0 16px; margin: 3px 0; }
#customer-detail .member-registration p { min-height: 24px; font-size: 15px; }
#customer-detail #detail-expires { color: #f13c25; }
#customer-detail .member-flags { margin: 3px 0 0; }
#customer-detail .member-flags:empty { display: none; }
#customer-detail .member-type { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 3px 0 0; padding: 0; border: 0; }
#customer-detail .member-type label { display: flex; align-items: center; gap: 6px; color: #43868a; font-size: 15px; font-weight: 400; }
#customer-detail .member-type input { width: 19px; height: 19px; min-height: 19px; margin: 0; padding: 0; accent-color: #88c426; }
#customer-detail .member-inline-fields { gap: 7px 14px; }
#customer-detail .member-inline-fields > div, #customer-detail .member-inline-fields > div.wide { grid-template-columns: 66px minmax(0, 1fr); gap: 4px; }
#customer-detail .member-inline-fields dt { color: #43868a; font-size: 15px; }
#customer-detail .member-inline-fields .inline-edit-input { min-height: 36px; height: 36px; border: 0; border-radius: 2px; padding: 6px 8px; color: #3f9c33; box-shadow: none; font-size: 16px; }
#customer-detail .member-inline-fields #detail-cost-line { background: #9bd5f1; color: #326980; max-width: 200px; }
#customer-detail .member-side-panel { display: flex; gap: 10px; }
#customer-detail .extra-settings-button { padding: 5px 10px; min-height: 40px; background: #3c8687; border: 0; border-radius: 3px; color: #d3f19a; font-size: 22px; box-shadow: 0 5px 9px #32323230; }
#customer-detail .extra-settings-button > span { font-size: 27px; vertical-align: middle; }
#customer-detail .member-consumption { text-align: right; color: #43868a; font-size: 14px; margin-top: 5px; }
#customer-detail .member-side-content { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; margin: 0; }
#customer-detail .member-qr-panel { gap: 0; align-content: start; }
#customer-detail .member-qr-panel > span { display: none; }
#customer-detail .member-qr-code { width: 104px; height: 104px; min-height: 104px; padding: 16px; border-radius: 50%; background: #00a9e2; }
#customer-detail .member-qr-code img, #customer-detail .member-qr-code canvas { width: 72px; height: 72px; max-width: 72px; max-height: 72px; border: 4px solid white; box-sizing: border-box; }
#customer-detail .wallet-panel { position: relative; padding: 0; border: 2px solid #649c80; border-radius: 2px; background: #ecffe1; }
#customer-detail .wallet-panel > summary { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 78px; padding: 8px; cursor: pointer; list-style: none; }
#customer-detail .wallet-panel > summary::-webkit-details-marker { display: none; }
#customer-detail .wallet-symbol { display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; color: #ecffe1; background: #3c8687; font-size: 32px; }
#customer-detail .wallet-heading { text-align: left; min-width: 0; }
#customer-detail .wallet-kicker { font-size: 20px; }
#customer-detail .wallet-total { margin: 0; }
#customer-detail .wallet-total strong { font-size: 20px; font-weight: 400; letter-spacing: 0; }
#customer-detail .wallet-panel .wallet-actions { padding: 8px; border-top: 1px solid #9bbd8d; }
#customer-detail .wallet-panel:not([open]) .wallet-actions { display: none; }
#customer-detail .member-alert { min-height: 44px; padding: 8px 10px; font-size: 15px; }
#customer-detail .member-update-button { min-height: 55px; font-size: 30px; font-weight: 400; padding: 8px 10px; border-radius: 3px; }
#customer-detail .member-card-footer { border: 0; }
#customer-detail .member-card-footer .documents { background: #3c8687; padding: 8px 5px; gap: 14px 24px; min-height: 58px; }
#customer-detail .member-card-footer .documents strong { display: block; width: 168px; padding: 4px 20px; background: #a8dba0; color: #3c8687; text-align: center; font-size: 18px; line-height: 1; border: 0; border-radius: 2px; box-sizing: border-box; }
#customer-detail .member-card-footer .document-action { min-height: 44px; background: none; color: white; border: 0; font-size: 16px; padding: 6px 4px; }
#customer-detail .document-action::before { content: ""; width: 17px; height: 17px; box-sizing: border-box; border: 5px solid #d54b17; border-radius: 50%; background: white; }
#customer-detail .document-action.ok::before { content: "✓"; display: grid; place-items: center; border: 0; border-radius: 3px; color: #65a322; background: #f5ffe9; font-size: 18px; }
#customer-detail .member-extra-actions .member-bottom-actions { display: flex; flex-direction: column; padding: 0; margin: 0; gap: 8px; background: none; }
#customer-detail .member-extra-actions #detail-fee-status { margin: 0; font-size: 14px; }
#customer-detail .member-secondary-actions { display: flex; justify-content: space-between; gap: 16px; padding: 20px 0 16px; }
#customer-detail .member-secondary-actions button { display: flex; align-items: center; justify-content: center; gap: 22px; width: 30%; min-height: 56px; border: 1px solid #69a79b; background: #ecffe1; color: #3c8687; border-radius: 3px; font-size: 19px; }
#customer-detail .member-secondary-actions button:last-child { background: #3c8687; color: white; }
#customer-detail .member-secondary-actions span { font-size: 34px; line-height: 1; }
#customer-detail .member-activity-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 6px 10px; background: #3c8687; color: white; }
#customer-detail .member-activity-heading h2 { flex: 1; text-align: center; font-size: 21px; font-weight: 400; }
#customer-detail .member-activity-heading button { min-height: 44px; padding: 8px 14px; border: 0; border-radius: 3px; background: #064574; color: #fff; font-size: 15px; }
#customer-detail .member-activity-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 52px; background: #efffe3; border-bottom: 1px solid #9cc6a9; color: #285f60; font-size: 17px; line-height: 1.35; }
#customer-detail .member-activity-row:nth-child(even) { background: #ccecc0; }
#customer-detail .member-activity-row > div { display: grid; align-content: center; padding: 7px 10px; border-right: 1px solid #9cc6a9; text-align: center; }
#customer-detail .member-activity-row strong, #customer-detail .member-activity-row time { display: block; font-size: 14px; line-height: 1.3; font-weight: 400; }
#customer-detail .member-activity-row p { align-self: center; margin: 0; padding: 9px 12px; color: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
#customer-detail #member-activity-more { display: block; width: 35%; min-height: 44px; margin: 10px auto; padding: 8px 12px; background: #3c8687; border: 0; border-radius: 3px; color: #fff; font-size: 16px; }
#customer-detail #member-comment-form { display: grid; gap: 8px; padding: 12px; background: #e9f8d8; }
#customer-detail #member-comment-form textarea { box-sizing: border-box; width: 100%; min-height: 100px; padding: 10px; border: 1px solid #75a49d; font-size: 17px; }
#customer-detail #member-comment-form button { justify-self: end; min-height: 44px; padding: 8px 16px; background: #3c8687; font-size: 16px; }
#customer-detail #member-activity-feedback, #customer-detail .activity-empty { padding: 12px 14px; margin: 0; font-size: 16px; color: #3b6862; }
#customer-detail .history-section { display: block; border: 0; border-top: 1px solid #9bbd8d; border-radius: 0; background: transparent; }
#customer-detail .history-section > summary { padding: 7px 12px; color: #3c8687; font-size: 12px; cursor: pointer; }
#customer-detail .history-section:not([open]) .table-wrap { display: none; }
#member-info-dialog { width: min(620px, calc(100vw - 32px)); box-sizing: border-box; max-height: 85dvh; overflow: auto; padding: 22px; border: 2px solid #3c8687; border-radius: 6px; background: #ecffe1; color: #3c8687; }
#member-info-dialog::backdrop { background: #16342e88; }
#member-info-dialog .modal-head { justify-content: space-between; }
#member-info-close { border: 1px solid #3c8687; background: white; color: #3c8687; border-radius: 50%; width: 30px; height: 30px; font-size: 20px; }
.member-registration-form { display: grid; gap: 0; margin: 12px 0 0; border: 1px solid #8eb9a2; }
.member-registration-form > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 14px; padding: 11px 14px; border-bottom: 1px solid #c4ddc8; font-size: 16px; }
.member-registration-form > div:last-child { border-bottom: 0; }
.member-registration-form dt { color: #427979; }
.member-registration-form dd { margin: 0; color: #234f50; font-weight: 600; overflow-wrap: anywhere; }
#member-settings-dialog { box-sizing: border-box; width: min(900px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; overflow: auto; border: 4px solid #3c8687; border-radius: 3px; background: #ecffe1; color: #3c8687; }
#member-settings-dialog::backdrop { background: #16342e88; }
.member-settings-head { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 6px 12px 6px 20px; }
.member-settings-head h2 { margin: 0; font-size: 22px; font-weight: 400; }
#member-settings-close { display: grid; place-items: center; width: 42px; min-width: 42px; height: 42px; min-height: 42px; padding: 0; border: 3px solid #3c8687; border-radius: 50%; background: #fff; color: #3c8687; font-size: 30px; line-height: 1; box-shadow: none; }
.member-settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 10px 20px 14px; }
.member-setting-action { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 62px; padding: 9px 12px; border: 1px solid #285e5f; border-radius: 4px; background: #fff; color: #2f7778; font-size: clamp(15px, 1.8vw, 19px); font-weight: 600; box-shadow: none; }
.member-setting-action > span { flex: 0 0 auto; font-size: 26px; line-height: 1; }
.member-setting-action.status { background: #f33434; color: #fff; }
.member-setting-action.renew { background: #88c426; color: #173f31; }
.member-setting-action.qr { background: #dc83e8; color: #fff; }
.member-setting-action.nfc { background: #3c8687; color: #fff; }
#member-rfid-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; margin: 0 20px; padding: 12px 14px; border: 1px solid #9bc1aa; border-radius: 5px; background: rgba(255, 255, 255, .45); }
#member-rfid-form label, #member-rfid-help, #member-rfid-feedback { grid-column: 1 / -1; }
#member-rfid-form input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 42px; padding: 8px 10px; }
#member-rfid-form button { min-height: 42px; padding: 8px 16px; }
#member-rfid-help, #member-rfid-feedback { margin: 0; font-size: 13px; line-height: 1.3; }
#member-nfc-status { min-height: 18px; margin: 7px 20px 0; color: #285e5f; font-size: 14px; line-height: 1.25; text-align: center; }
#member-settings-dialog #detail-fee-status { margin: 4px 20px 12px; font-size: 14px; text-align: center; }
@media (max-width: 720px) {
 .member-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .member-setting-action.nfc { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
 #member-settings-dialog { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); }
 .member-settings-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 6px 12px 10px; }
 .member-setting-action { min-height: 48px; padding: 7px 10px; }
 .member-setting-action.nfc { grid-column: auto; }
 #member-rfid-form { grid-template-columns: minmax(0, 1fr); margin: 0 12px; padding: 9px 10px; }
 #member-rfid-form label, #member-rfid-help, #member-rfid-feedback { grid-column: auto; }
 #member-nfc-status, #member-settings-dialog #detail-fee-status { margin-left: 12px; margin-right: 12px; }
 .member-registration-form > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
@media (max-height: 700px) and (min-width: 521px) {
 .member-settings-head { min-height: 46px; padding-top: 3px; padding-bottom: 3px; }
 #member-settings-close { width: 36px; min-width: 36px; height: 36px; min-height: 36px; font-size: 26px; }
 .member-settings-grid { gap: 8px; padding-top: 5px; padding-bottom: 8px; }
 .member-setting-action { min-height: 48px; padding-top: 6px; padding-bottom: 6px; }
 #member-rfid-form { padding-top: 8px; padding-bottom: 8px; }
}
.member-statistics { display: grid; gap: 12px; }
.member-statistics > div { display: flex; justify-content: space-between; gap: 16px; }
.member-statistics dd { margin: 0; font-weight: bold; }
.sponsored-member { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 12px; margin-top: 8px; border: 1px solid #8fbca0; background: white; color: #3c8687; text-align: left; }
@media (max-width: 1100px) {
 #customer-detail .member-card-main { grid-template-columns: minmax(0, 1.5fr) minmax(265px, 1fr); gap: 12px; }
 #customer-detail .member-top-left { grid-template-columns: 145px minmax(0, 1fr); }
 #customer-detail .member-photo-panel, #customer-detail #detail-photo, #customer-detail #detail-photo .avatar.card { width: 145px; height: 120px; }
 #customer-detail .member-summary p, #customer-detail .member-summary .membership-number { font-size: 15px; }
 #customer-detail .member-registration { gap: 2px 9px; }
 #customer-detail .member-registration p { font-size: 14px; }
 #customer-detail .member-type label { font-size: 14px; }
 #customer-detail .member-inline-fields { gap: 6px 10px; }
 #customer-detail .member-inline-fields > div, #customer-detail .member-inline-fields > div.wide { grid-template-columns: 62px minmax(0, 1fr); }
 #customer-detail .member-inline-fields dt { font-size: 14px; }
 #customer-detail .member-side-content { grid-template-columns: 90px minmax(0, 1fr); gap: 14px; }
 #customer-detail .member-qr-code { width: 90px; height: 90px; min-height: 90px; padding: 13px; }
 #customer-detail .member-qr-code img, #customer-detail .member-qr-code canvas { width: 64px; height: 64px; }
 #customer-detail .wallet-symbol { width: 35px; height: 35px; font-size: 24px; }
 #customer-detail .wallet-panel > summary { gap: 6px; padding: 5px; }
 #customer-detail .wallet-total strong, #customer-detail .wallet-kicker { font-size: 17px; }
 #customer-detail .extra-settings-button { font-size: 18px; }
}
@media (max-width: 1440px) {
 .member-note-trigger { top: 8px; right: 8px; width: 50px; height: 50px; min-height: 50px; border-radius: 10px; }
 #customer-detail .extra-settings-button { width: calc(100% - 60px); }
}
@media (max-width: 900px) {
 .workspace:has(#customer-detail-view:not(.hidden)) { padding: 12px; }
 #customer-detail .member-card-main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "identity" "fields" "actions"; }
 #customer-detail .member-top-left { grid-template-columns: 130px minmax(0, 1fr); }
 #customer-detail .member-photo-panel, #customer-detail #detail-photo, #customer-detail #detail-photo .avatar.card { width: 130px; height: 115px; }
 #customer-detail .member-inline-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 #customer-detail .member-side-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
 #customer-detail .member-side-panel > * { grid-column: auto; grid-row: auto; }
 #customer-detail .member-side-content { grid-template-columns: 110px minmax(0, 1fr); }
 #customer-detail .member-update-button { min-height: 44px; font-size: 24px; }
 #customer-detail .member-card-footer .documents { gap: 10px 15px; padding: 10px; }
 #customer-detail .member-card-footer .documents strong { width: auto; }
 #customer-detail .member-card-footer .document-action { font-size: 15px; }
 #customer-detail .member-secondary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px 8px; gap: 8px; }
 #customer-detail .member-secondary-actions button { width: 100%; font-size: 14px; min-height: 44px; gap: 10px; }
 #customer-detail .member-secondary-actions span { font-size: 24px; }
 #customer-detail .member-activity-row { grid-template-columns: 150px minmax(0, 1fr); }
}
@media (max-width: 600px) {
 #customer-detail .member-top-left { grid-template-columns: 110px minmax(0, 1fr); }
 #customer-detail .member-photo-panel,
 #customer-detail #detail-photo,
 #customer-detail #detail-photo .avatar.card { width: 110px; height: 100px; }
 #customer-detail .member-inline-fields { grid-template-columns: minmax(0, 1fr); gap: 7px; }
 #customer-detail .member-inline-fields > div,
 #customer-detail .member-inline-fields > div.wide { grid-template-columns: 80px minmax(0, 1fr); }
 #customer-detail .member-side-content { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
 #customer-detail .member-card-footer .documents { align-items: stretch; }
 #customer-detail #member-document-manager { width: 100%; }
 #customer-detail .member-secondary-actions { grid-template-columns: minmax(0, 1fr); }
 #customer-detail .member-activity-heading { align-items: stretch; flex-direction: column; }
 #customer-detail .member-activity-heading h2 { margin: 0; text-align: center; }
 #customer-detail .member-activity-row { grid-template-columns: 110px minmax(0, 1fr); }
}
@media (max-width: 480px) {
 #customer-detail .member-inline-fields { grid-template-columns: minmax(0, 1fr); gap: 7px; }
 #customer-detail .member-inline-fields .inline-edit-input { min-height: 32px; height: 32px; font-size: 16px; }
 #customer-detail .member-inline-fields > div, #customer-detail .member-inline-fields > div.wide { grid-template-columns: 80px minmax(0, 1fr); }
 #customer-detail .member-activity-heading h2 { text-align: left; font-size: 18px; }
 #customer-detail .member-activity-heading button { font-size: 14px; }
}

/* QR preview uses the same download image, including its white scanning margin. */
#customer-detail button.member-qr-code { cursor: pointer; box-shadow: none; }
#customer-detail button.member-qr-code:hover { outline: 2px solid var(--card-teal); outline-offset: 3px; }
.member-qr-preview { text-align: center; }
.member-qr-preview > img { display: block; width: min(100%, 330px); height: auto; margin: 16px auto; }
.member-qr-preview .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.member-qr-preview .member-qr-help { font-size: 13px; overflow-wrap: anywhere; }
.member-qr-preview .member-qr-help.warning { color: #c62828; font-weight: 700; }

#customer-detail #member-document-manager { width: 180px; min-height: 48px; padding: 7px 20px; background: #a8dba0; color: #3c8687; font-size: 18px; line-height: 1.1; border: 0; border-radius: 2px; box-shadow: none; cursor: pointer; }
#member-documents-dialog { box-sizing: border-box; width: min(1120px, calc(100vw - 32px)); max-height: 90dvh; padding: 0; overflow: auto; border: 6px solid #3c8687; border-radius: 4px; background: #a8dba0; color: #3c8687; font-family: Arial, sans-serif; }
#member-documents-dialog::backdrop { background: #16342e88; }
#member-documents-dialog .modal-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; padding: 12px 18px; background: #3c8687; color: white; }
#member-documents-dialog h2 { margin: 0; font-size: 22px; }
#member-documents-close { background: #ecffe1; color: #3c8687; border: 0; font-size: 24px; padding: 0 8px; }
#member-documents-form { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; padding: 20px; }
#member-documents-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.member-document-tile { min-width: 0; padding: 12px; background: white; }
.member-document-tile h3 { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 0 0 12px; font-size: 18px; font-weight: 400; }
.member-document-tile h3 span { font-size: 12px; }
.member-document-tile label { display: grid; gap: 5px; margin-bottom: 12px; font-size: 14px; }
.member-document-tile input { box-sizing: border-box; width: 100%; min-width: 0; font-size: 12px; }
.member-document-camera { box-sizing: border-box; width: 100%; min-height: 48px; margin-bottom: 12px; border: 1px solid #3c8687; border-radius: 5px; background: #49627e; color: white; font-size: 16px; font-weight: 800; }
.member-document-tile img { display: block; width: 100%; max-height: 300px; object-fit: contain; margin-top: 12px; background: #f3f7ef; }
.member-document-view { display: inline-block; background: #a8dba0; color: #326d6d; padding: 4px 8px; }
.member-document-state { font-size: 12px; overflow-wrap: anywhere; }
.member-documents-save > button { width: 100%; background: #88c426; border: 0; border-radius: 3px; padding: 18px 12px; color: white; font-size: 28px; font-weight: 400; }
#member-documents-feedback { font-size: 14px; }
@media (max-width: 760px) { #member-documents-form { grid-template-columns: minmax(0, 1fr); padding: 12px; } }
@media (max-width: 480px) { #member-documents-grid { grid-template-columns: minmax(0, 1fr); } }

#member-document-camera-dialog { box-sizing: border-box; width: min(720px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 24px; border: 4px solid #3c8687; border-radius: 12px; color: #26343d; }
#member-document-camera-dialog::backdrop { background: rgba(20, 35, 30, 0.72); }
#member-document-camera-dialog h2 { margin-top: 0; color: #2f797b; }
#member-document-camera-video { display: block; width: 100%; max-height: 65dvh; aspect-ratio: 4 / 3; object-fit: contain; background: #17251e; border-radius: 8px; }
.member-document-camera-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 18px; }
.member-document-camera-actions button { min-height: 50px; padding: 10px 22px; font-size: 17px; }

/* Square checkmark radios match the original membership type controls. */
#customer-detail .member-type input, #new-customer-view .member-type input {
 appearance: none; flex: 0 0 30px; width: 30px; height: 30px; min-height: 30px; margin: 0;
 border: 1px solid #3c8687; border-radius: 7px; background: white; padding: 0; cursor: pointer;
}
#customer-detail .member-type input:checked, #new-customer-view .member-type input:checked {
 background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M5 16l7 7L28 6' fill='none' stroke='%2388c426' stroke-width='7'/%3E%3C/svg%3E") center / 90% no-repeat;
}

/* Original registration layout: photo and camera above three compact field columns. */
.workspace:has(#new-customer-view:not(.hidden)) { width: 100%; max-width: 1130px; padding: 10px 24px 32px; box-sizing: border-box; }
#new-customer-view { color: #3c8687; font-family: Arial, Helvetica, sans-serif; }
#new-customer-view .new-member-form { max-width: none; padding: 0; border: 1px solid #3c8687; border-radius: 0; background: #d3f19a; box-shadow: none; }
#new-customer-view .new-member-main { display: block; padding: 10px 6px 24px; }
.new-member-photo-row { display: flex; justify-content: space-between; align-items: start; margin-bottom: 8px; }
#new-customer-view #new-member-photo-preview { flex: 0 0 180px; width: 180px; height: 135px; min-height: 0; border: 0; border-radius: 0; background: #3c8687 url('img/member-placeholder.svg') center / cover no-repeat; color: transparent; font-size: 0; }
#new-customer-view #new-member-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.new-member-camera { position: relative; width: 180px; min-height: 135px; background: #a8dba0; border: 1px solid #3c8687; }
#new-customer-view #new-member-camera-video { display: block; width: 178px; height: 133px; object-fit: cover; }
#new-customer-view #take-member-photo { position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); width: max-content; min-height: 24px; padding: 4px 6px; border: 0; border-radius: 0; background: #519548; color: white; font-size: 12px; font-weight: 400; text-transform: uppercase; }
#new-member-camera-status { position: absolute; right: 0; bottom: 100%; width: 230px; margin: 0; padding: 4px; background: #ecffe1; color: #3c8687; font-size: 11px; }
#new-member-camera-status:empty { display: none; }
#new-customer-view .new-member-fields { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 10px 16px; padding: 0 16px 0 6px; }
#new-customer-view .new-member-fields > label, #new-customer-view .readonly-field { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 4px; margin: 0; padding: 0; border: 0; background: none; color: #3c8687; font-size: 16px; font-weight: 400; }
#new-customer-view .new-member-fields > label:nth-child(3n + 2) { grid-template-columns: 156px minmax(0, 1fr); }
#new-customer-view .new-member-fields > label > span, #new-customer-view .readonly-field > span { text-align: right; color: inherit; font-size: inherit; font-weight: 400; }
#new-customer-view .new-member-fields input:not([type="radio"]), #new-customer-view .readonly-field strong { box-sizing: border-box; width: 100%; min-width: 0; height: 26px; min-height: 26px; margin: 0; padding: 3px 5px; border: 0; border-radius: 3px; background: white; color: #3f9c33; font: 15px Arial, sans-serif; box-shadow: none; }
#new-customer-view .readonly-field strong, #new-customer-view .new-member-fields input[name="sponsor_membership_number"], #new-customer-view .new-member-fields input[name="max_consumption_grams"] { max-width: 100px; background: #323232; color: white; }
#new-customer-view .member-type { display: flex; justify-content: flex-end; flex-wrap: wrap; align-items: center; gap: 8px 20px; border: 0; margin: 0; padding: 8px 0; min-width: 0; }
#new-customer-view .member-type label { display: flex; align-items: center; gap: 4px; color: #3c8687; font-size: 15px; font-weight: 400; }
#new-customer-view .member-type input { flex-basis: 24px; width: 24px; height: 24px; min-height: 24px; border-radius: 5px; }
#new-customer-view .required-star { display: none; }
#new-customer-view .new-membership-fee { display: flex; align-items: start; gap: 76px; padding: 9px 18px; background: #3c8687; }
#new-customer-view .new-membership-fee h2 { margin: 0; color: white; font: 26px Arial, sans-serif; text-transform: uppercase; }
#new-customer-view .new-membership-fee-card { width: 255px; padding: 4px; background: #d3f19a; color: #3c8687; }
#new-customer-view .new-membership-fee-card > div { display: flex; align-items: center; gap: 4px; padding-bottom: 7px; border-bottom: 1px solid #3c8687; font-size: 22px; }
#new-customer-view .new-membership-fee-card strong { font-weight: 400; }
#new-customer-view .new-membership-fee-card small { font-size: 13px; }
.new-membership-fee-check { display: inline-grid; place-items: center; width: 24px; height: 24px; background: white; border: 1px solid #3c8687; border-radius: 5px; color: #88c426; font-size: 27px; line-height: 1; }
.new-membership-fee-card img { display: block; width: 45px; height: 34px; margin: 9px; }
#new-customer-view .new-member-submit { display: flex; justify-content: center; padding: 18px 12px 28px; margin: 0; }
#new-customer-view .new-member-submit button { width: 42%; min-width: 240px; padding: 10px 20px; border: 0; border-radius: 3px; background: #88c426; color: white; font: 36px/1.15 Arial, sans-serif; text-transform: uppercase; box-shadow: none; }
.new-member-options { padding: 10px 18px; font-size: 13px; }
.new-member-options summary { cursor: pointer; }
.new-member-options label { display: grid; gap: 4px; max-width: 450px; margin: 10px 0; }
#new-customer-view input:focus-visible, #new-customer-view textarea:focus-visible { outline: 2px solid #3c8687; outline-offset: 2px; }
@media (max-width: 900px) {
 #new-customer-view .new-member-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 #new-customer-view .new-member-spacer { display: none; }
 #new-customer-view .member-type { grid-column: 1 / -1; justify-content: start; }
 #new-customer-view .new-member-fields > label:nth-child(3n + 2) { grid-template-columns: 96px minmax(0, 1fr); }
}
@media (max-width: 550px) {
 .workspace:has(#new-customer-view:not(.hidden)) { padding: 12px; }
 #new-customer-view .new-member-fields { grid-template-columns: minmax(0, 1fr); padding: 8px; }
 #new-customer-view .new-member-fields input:not([type="radio"]) { font-size: 16px; height: 32px; }
 #new-customer-view #new-member-photo-preview { flex-basis: 125px; width: 125px; height: 94px; }
 .new-member-camera { width: 125px; min-height: 94px; }
 #new-customer-view #new-member-camera-video { width: 123px; height: 92px; }
 #new-customer-view .new-membership-fee { gap: 16px; padding: 12px; }
 #new-customer-view .new-membership-fee h2 { font-size: 20px; }
 #new-customer-view .new-membership-fee-card { width: 220px; }
 #new-customer-view .new-membership-fee-card > div { font-size: 18px; }
 #new-customer-view .new-member-submit button { width: 85%; min-width: 0; font-size: 30px; }
}

#product-sale-form { display: grid; gap: 14px; }
#product-sale-form .modal-head { justify-content: space-between; }
#product-sale-form h3, #product-sale-form p { margin: 0; }
#product-sale-form label { display: grid; gap: 8px; }
#product-sale-grams, #product-sale-credits { box-sizing: border-box; width: 100%; min-height: 52px; padding: 8px 12px; font-size: 22px; font-variant-numeric: tabular-nums; }
#product-sale-form .actions { display: flex; justify-content: flex-end; gap: 10px; }
#product-sale-feedback { font-weight: 600; }
#product-cart-items { display: grid; gap: 8px; margin: 18px 0; }
.product-cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px; min-height: 58px; padding: 9px 12px; border: 1px solid #9bc4a8; background: white; font-size: 16px; }
.product-cart-line span, .product-cart-line strong { white-space: nowrap; }
.product-cart-remove { width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid #b84b40; background: #fff; color: #a33128; font-size: 24px; }
#product-cart-feedback { min-height: 24px; }
@media (max-width: 600px) { .product-cart-line { grid-template-columns: minmax(0, 1fr) auto; } }

#customer-detail img.wallet-symbol { object-fit: contain; border-radius: 0; background: transparent; }

#customer-detail .document-action.optional::before { content: "○"; width: 17px; height: 17px; border: 0; background: none; color: inherit; font-size: 18px; }

#customer-detail .wallet-open-button { width: 100%; cursor: pointer; font-family: inherit; }
#customer-detail .wallet-summary { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 92px; padding: 10px; }
#customer-detail .wallet-open-button:hover { background: #e0f7cc; }
#wallet-current-balance { color: #3c8687; font-size: 16px; font-variant-numeric: tabular-nums; }
#balance-modal.wallet-dialog { width: min(740px, calc(100vw - 32px)); max-height: 90dvh; box-sizing: border-box; padding: 0; border: 3px solid #3c8687; border-radius: 4px; background: #ecffe1; color: #3c8687; overflow-x: hidden; overflow-y: auto; }
#balance-modal::backdrop { background: #172e2b99; }
#balance-modal #balance-form { box-sizing: border-box; width: 100%; max-width: none; margin: 0; padding: 24px; border: 0; border-radius: 0; background: #ecffe1; box-shadow: none; }
#balance-modal .modal-head { justify-content: space-between; }
#balance-modal h2 { color: #3c8687; font-size: 23px; }
#balance-modal .wallet-form-row { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 12px; }
#balance-modal label { display: grid; gap: 6px; color: #3c8687; font-size: 14px; }
#balance-modal input, #balance-modal select { width: 100%; min-width: 0; box-sizing: border-box; height: 40px; padding: 6px 8px; border: 1px solid #90b9a0; border-radius: 4px; background: white; color: #326f3b; font-size: 17px; }
#balance-modal .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-start; }
#balance-modal .primary { min-height: 42px; padding: 8px 24px; border: 0; border-radius: 4px; background: #88c426; color: #213f19; font-size: 20px; }
#balance-modal #wallet-feedback { margin: 0; font-size: 14px; }
.wallet-history { margin-top: 12px; padding-top: 16px; border-top: 2px solid #90b9a0; }
.wallet-history h3 { margin: 0 0 12px; font-size: 20px; }
#wallet-history-list { display: grid; width: 100%; min-width: 0; max-height: 280px; overflow-x: hidden; overflow-y: auto; border: 1px solid #90b9a0; background: white; }
.wallet-history-head, .wallet-history-row { display: grid; grid-template-columns: minmax(90px, .9fr) minmax(90px, 1fr) minmax(150px, 2fr) minmax(78px, .8fr) minmax(82px, .85fr); align-items: center; gap: 0; min-width: 0; }
.wallet-history-head { position: sticky; top: 0; z-index: 1; min-height: 38px; background: #3c8687; color: white; font-size: 13px; font-weight: 800; text-transform: uppercase; }
.wallet-history-head span { padding: 8px 10px; }
.wallet-history-row { min-height: 50px; border-bottom: 1px solid #c8ddce; color: #285e5f; }
.wallet-history-row:nth-child(odd) { background: #efffe3; }
.wallet-history-row:nth-child(even) { background: #ccecc0; }
.wallet-history-row > * { box-sizing: border-box; min-width: 0; padding: 8px 8px; overflow-wrap: anywhere; }
.wallet-history-row:last-child { border-bottom: 0; }
.wallet-history-row span, .wallet-history-row time { font-size: 13px; }
.wallet-history-row time { white-space: nowrap; }
.wallet-history-row .credit { color: #27823d; font-size: 17px; }
.wallet-history-row .debit { color: #b64035; font-size: 17px; }
.wallet-history-empty { margin: 0; padding: 18px; color: #71877b; }
@media (max-width: 700px) {
 .wallet-history-head { display: none; }
 .wallet-history-row { grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px; }
 .wallet-history-row > * { padding: 3px 5px; }
 .wallet-history-row > :nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 600px) { #balance-modal .wallet-form-row { grid-template-columns: minmax(0, 1fr); } }
