.admin-members-panel{background:var(--bg-soft); border:1px solid var(--line); border-radius:8px; padding:24px;}
.admin-members-head{display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:18px;}
.admin-members-head h3{font-family:var(--serif); font-size:1.2rem; margin:0; color:var(--heading);}
.admin-members-head .muted{color:var(--ink-soft); font-size:0.82rem; margin:4px 0 0;}
.admin-members-tools{display:flex; align-items:flex-end; gap:12px;}
.admin-search-field{width:min(340px,100%); margin:0;}
.admin-member-filters{display:flex; flex-wrap:wrap; gap:8px; margin:0 0 14px;}
.admin-member-filter.active{border-color:var(--teal); background:rgba(var(--primary-rgb),0.12);}
.admin-editor{border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding:22px 0; margin:18px 0;}
.admin-editor.hidden{display:none;}
.admin-editor-head{display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px;}
.admin-editor-head h3{font-family:var(--serif); font-size:1.12rem; color:var(--heading); margin:0;}
.admin-editor-head .muted{color:var(--ink-soft); font-size:0.82rem; margin:4px 0 0;}
.admin-close{border:0; background:transparent; color:var(--ink-soft); cursor:pointer; font-size:1.7rem; line-height:1; padding:0 4px;}
.admin-form-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 18px;}
.admin-form-grid .field.hidden{display:none;}
.admin-checkbox{display:flex; align-items:center; gap:8px; color:var(--heading); font-size:0.88rem; font-weight:700;}
.admin-checkbox input{width:18px; height:18px; accent-color:var(--teal);}
.admin-form-actions{display:flex; flex-wrap:wrap; gap:10px; margin-top:20px;}
.admin-import-status{min-height:20px; margin:0 0 12px;}
.admin-import-preview{max-height:360px; overflow:auto; border:1px solid var(--line); border-radius:6px;}
.admin-import-preview.hidden{display:none;}
.admin-import-preview table{min-width:760px; width:100%; margin:0;}
.admin-import-preview input{width:100%; min-width:130px; padding:7px 9px; border:1px solid var(--line); border-radius:5px; background:var(--input-bg); color:var(--ink); font:inherit;}
.admin-import-preview td:nth-child(n+4){font-size:0.78rem; color:var(--ink-soft); white-space:normal; min-width:260px;}
.admin-action-message{display:none; border-radius:6px; padding:10px 12px; font-size:0.84rem; font-weight:700; white-space:pre-line;}
.admin-action-message.success{display:block; color:var(--teal); background:rgba(var(--primary-rgb),0.12);}
.admin-action-message.error{display:block; color:var(--terracotta); background:rgba(139,58,58,0.1);}
.admin-row-actions{display:flex; flex-wrap:wrap; gap:6px;}
.admin-row-action{border:1px solid var(--line); background:var(--input-bg); color:var(--teal); border-radius:5px; padding:6px 9px; cursor:pointer; font:700 0.75rem var(--sans);}
.admin-row-action-danger{color:var(--terracotta);}
.admin-member-link{border:0; background:transparent; color:var(--teal); padding:0; cursor:pointer; font:700 0.92rem var(--sans); text-align:left;}
.admin-member-link:hover{text-decoration:underline;}
.admin-members-state{color:var(--ink-soft); margin:20px 0; text-align:center;}
.admin-members-table-wrap{overflow-x:auto;}
.admin-members-table{min-width:0; width:100%; table-layout:fixed;}
.admin-members-table td:first-child{font-weight:700; color:var(--heading);}
table.payments.admin-members-table th:nth-child(1), table.payments.admin-members-table td:nth-child(1){width:31%;}
table.payments.admin-members-table th:nth-child(2), table.payments.admin-members-table td:nth-child(2){width:27%;}
table.payments.admin-members-table th:nth-child(3), table.payments.admin-members-table td:nth-child(3),
  table.payments.admin-members-table th:nth-child(4), table.payments.admin-members-table td:nth-child(4){width:21%; text-align:right;}
.admin-members-table td.amount-col{white-space:nowrap;}
.admin-member-reference{display:block; margin-top:3px; color:var(--ink-soft); font-size:0.75rem; font-weight:400;}
.admin-members-table-wrap.hidden{display:none;}
.admin-pagination{display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:12px; margin-top:14px; color:var(--ink-soft); font-size:0.82rem;}
.admin-pagination.hidden{display:none;}
.admin-members-panel.hidden, .admin-member-detail.hidden, #admin-detail-content.hidden{display:none;}
.admin-member-detail{background:var(--bg-soft); border:1px solid var(--line); border-radius:8px; padding:24px; scroll-margin-top:96px;}
.admin-detail-toolbar, .admin-detail-section-head{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;}
.admin-detail-toolbar-actions{display:flex; align-items:center; gap:8px; flex-wrap:wrap;}
.admin-back-button{border:0; background:transparent; color:var(--teal); padding:4px 0; cursor:pointer; font:700 0.84rem var(--sans);}
.admin-detail-heading{display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin:24px 0;}
.admin-detail-heading h3{font-family:var(--serif); color:var(--heading); font-size:1.7rem; margin:0;}
.admin-detail-info{display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); border-top:1px solid var(--line); border-bottom:1px solid var(--line); margin:0 0 28px;}
.admin-detail-info div{padding:16px; border-right:1px solid var(--line); min-width:0;}
.admin-detail-info div:last-child{border-right:0;}
.admin-detail-info dt{font-size:0.72rem; text-transform:uppercase; font-weight:700; color:var(--ink-soft);}
.admin-detail-info dd{margin:5px 0 0; color:var(--heading); overflow-wrap:anywhere;}
.admin-detail-section{margin-top:30px; padding:0;}
.admin-detail-section-head{margin-bottom:10px;}
.admin-detail-section h4{font-family:var(--serif); color:var(--heading); font-size:1.08rem; margin:0;}
.admin-qr-panel{display:flex; justify-content:space-between; align-items:center; gap:20px; flex-wrap:wrap; padding:16px 18px; border:1px solid var(--line); border-radius:8px; background:var(--page-bg); margin:18px 0;}
.admin-qr-panel.hidden, .admin-qr-preview.hidden{display:none;}
.admin-qr-panel h4{margin:0; font-family:var(--serif); color:var(--heading); font-size:1.08rem;}
.admin-qr-panel-copy > p{max-width:620px; margin:6px 0; color:var(--ink-soft); font-size:0.84rem;}
.admin-qr-panel .admin-qr-status{font-weight:700; color:var(--ink);}
.admin-qr-actions{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px;}
.admin-qr-preview{flex:1 1 100%; width:100%;}
.admin-detail-table-wrap{overflow-x:auto;}
.admin-detail-table{min-width:720px;}
.admin-detail-edit-row td{background:var(--page-bg);}
.admin-detail-inline-form{display:grid; grid-template-columns:repeat(4,minmax(120px,1fr)); gap:12px; align-items:end;}
.admin-detail-inline-form .field{margin:0;}
.admin-detail-inline-actions{display:flex; gap:8px; align-items:center; padding-bottom:1px;}
table.payments.admin-detail-table{min-width:800px; table-layout:fixed;}
table.payments.admin-detail-table th:nth-child(1), table.payments.admin-detail-table td:nth-child(1){width:9%;}
table.payments.admin-detail-table th:nth-child(2), table.payments.admin-detail-table td:nth-child(2){width:23%;}
table.payments.admin-detail-table th:nth-child(3), table.payments.admin-detail-table td:nth-child(3){width:18%;}
table.payments.admin-detail-table th:nth-child(4), table.payments.admin-detail-table td:nth-child(4){width:15%;}
table.payments.admin-detail-table th:nth-child(5), table.payments.admin-detail-table td:nth-child(5){width:15%; text-align:center;}
table.payments.admin-detail-table th:nth-child(6), table.payments.admin-detail-table td:nth-child(6){width:20%;}
table.payments.admin-detail-table th:nth-child(3), table.payments.admin-detail-table th:nth-child(4){text-align:right;}
.admin-detail-table .admin-row-actions{justify-content:flex-start;}

@media (min-width: 3400px){
  .admin-detail-table{min-width:1440px;}
}

@media (max-width: 680px){
  .admin-members-head{align-items:stretch; flex-direction:column;}
  .admin-members-tools{align-items:stretch; flex-direction:column;}
  .admin-search-field{width:100%;}
  .admin-form-grid{grid-template-columns:1fr;}
  .admin-member-detail{padding:18px;}
  .admin-detail-heading{align-items:center;}
  .admin-detail-info{grid-template-columns:repeat(2,minmax(0,1fr));}
  .admin-detail-info div:nth-child(2){border-right:0;}
  .admin-detail-info div:nth-child(-n+2){border-bottom:1px solid var(--line);}
  .admin-detail-inline-form{grid-template-columns:1fr 1fr;}
}
