/* =================================================================
   Charitable Trust Tracker – Frontend CSS
   ================================================================= */

.ctt-frontend { font-family: inherit; max-width: 900px; margin: 0 auto 30px; }
.ctt-trust-name { color: #047857; font-size: 1.6em; margin-bottom: 4px; }
.ctt-period { color: #6b7280; font-size: .95em; margin-top: 0; }

/* Month pills */
.ctt-month-pills-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 20px; padding-bottom: 6px; scrollbar-width: none; }
.ctt-month-pills-wrap::-webkit-scrollbar { display: none; }
.ctt-month-pills { display: flex; gap: 8px; flex-wrap: nowrap; width: max-content; }
.ctt-pill { flex-shrink: 0; padding: 6px 16px; border-radius: 20px; border: 1px solid #a7f3d0; background: #f0fdf4; color: #047857; font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.ctt-pill:hover { background: #d1fae5; color: #065f46; text-decoration: none; }
.ctt-pill-active { background: #059669; color: #fff !important; border-color: #059669; }
.ctt-pill-active:hover { background: #047857; }

/* Summary cards */
.ctt-fe-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.ctt-fe-card { flex: 1 1 140px; background: #fff; border: 1px solid #e5e7eb; border-left: 4px solid #059669; border-radius: 6px; padding: 14px 16px; }
.ctt-fe-card span { display: block; font-size: 11px; color: #6b7280; text-transform: uppercase; margin-bottom: 4px; }
.ctt-fe-card strong { font-size: 18px; color: #111827; }
.ctt-fe-green  { border-left-color: #047857; background: #f0fdf4; }
.ctt-fe-dark   { border-left-color: #1f2937; background: #f9fafb; }

/* Table */
.ctt-fe-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ctt-fe-table th { background: #f0fdf4; text-align: left; padding: 10px 12px; border-bottom: 2px solid #a7f3d0; color: #065f46; }
.ctt-fe-table td { padding: 6px 6px; border-bottom: 1px solid #e5e7eb;font-size: 12px; font-weight: 600; }
.ctt-fe-table tr:last-child td { border-bottom: none; }

/* Badges */
.ctt-mem-badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 9px; font-weight: 600; }
.ctt-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.ctt-badge-paid      { background: #d1fae5; color: #065f46; }
.ctt-badge-partial   { background: #fef3c7; color: #92400e; }
.ctt-badge-opted-out { background: #fee2e2; color: #991b1b; }
.ctt-badge-pending   { background: #ffdfdf !important; color: #374151; }

/* Ledger shortcode */
.ctt-ledger-wrap {  border-radius: 8px; padding: 20px 0px; }
.ctt-ledger-title { color: #047857; margin-top: 0; margin-bottom: 16px; font-size: 1.15em; }
.ctt-ledger-scroll { overflow-x: auto; }
.ctt-ledger-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ctt-ledger-table th { background: #f0fdf4; color: #065f46; padding: 9px 12px; text-align: right; border-bottom: 2px solid #d1fae5; white-space: nowrap; }
.ctt-ledger-table th:first-child { text-align: left; }
.ctt-ledger-table td { padding: 8px 12px; border-bottom: 1px solid #f3f4f6; text-align: right; white-space: nowrap; }
.ctt-ledger-table td:first-child { text-align: left; color: #374151; }
.ctt-ledger-table tbody tr:hover { background: #f9fafb; }
.ctt-ledger-collected { color: #059669; }
.ctt-ledger-expense { color: #dc2626; }
.ctt-ledger-closing { color: #1d4ed8; }
.ctt-ledger-total-row { background: #f0fdf4; }
.ctt-ledger-total-row td { border-bottom: 2px solid #d1fae5; padding-top: 10px; padding-bottom: 10px; }

/* Activity costs card in summary row */
.ctt-fe-expense { background: #fff7ed; border-color: #fed7aa; }
.ctt-fe-expense span { color: #92400e; }
.ctt-fe-expense strong { color: #c2410c; }

/* Activity costs box in dashboard */
.ctt-activity-month-box { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 14px 18px; margin: 16px 0; }
.ctt-activity-month-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 15px; color: #92400e; }
.ctt-activity-month-icon { font-size: 18px; }
.ctt-activity-month-list { list-style: none; margin: 0 0 10px; padding: 0; }
.ctt-activity-month-list li { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; border-bottom: 1px solid #fde68a; font-size: 13px; }
.ctt-activity-month-list li:last-child { border-bottom: none; }
.ctt-activity-month-name { flex: 1; color: #374151; }
.ctt-activity-month-date { color: #a16207; font-size: 12px; }
.ctt-activity-month-cost { color: #c2410c; font-weight: 600; margin-left: auto; }
.ctt-activity-month-total { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: #92400e; text-align: right; }

/* Activities shortcode */
.ctt-act-wrap { font-family: inherit; max-width: 860px; margin: 0 auto; }
.ctt-act-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 8px; }
.ctt-act-title { margin: 0; color: #047857; font-size: 1.25em; }
.ctt-act-grand-total { background: #065f46; color: #fff; border-radius: 20px; padding: 4px 14px; font-size: 13px; font-weight: 600; white-space: nowrap; }

/* Month group */
.ctt-act-month { margin-bottom: 28px; }
.ctt-act-month-heading { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; background: #f0fdf4; border-left: 4px solid #059669; border-radius: 4px; margin-bottom: 10px; }
.ctt-act-month-label { font-weight: 700; color: #065f46; font-size: 14px; }
.ctt-act-month-total { font-size: 13px; color: #059669; font-weight: 600; }

/* Activity card (details/summary) */
.ctt-act-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 10px; overflow: hidden; transition: box-shadow .15s; }
.ctt-act-card[open] { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.ctt-act-summary { cursor: pointer; list-style: none; padding: 0; }
.ctt-act-summary::-webkit-details-marker { display: none; }
.ctt-act-summary-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; gap: 12px; }
.ctt-act-card[open] .ctt-act-summary-inner { border-bottom: 1px solid #f3f4f6; }
.ctt-act-meta { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.ctt-act-name { font-weight: 600; color: #111827; font-size: 14px; }
.ctt-act-date { font-size: 12px; color: #9ca3af; }
.ctt-act-cost { font-size: 15px; font-weight: 700; color: #c2410c; white-space: nowrap; }

/* Expand chevron via ::after on summary */
.ctt-act-summary::after { content: '\25BE'; float: right; margin-right: 18px; margin-top: -28px; color: #9ca3af; font-size: 14px; pointer-events: none; }
.ctt-act-card[open] > .ctt-act-summary::after { content: '\25B4'; }

/* Body */
.ctt-act-body { padding: 16px 18px; }
.ctt-act-desc { margin: 0 0 14px; color: #4b5563; font-size: 13px; line-height: 1.5; }
.ctt-act-no-items { color: #9ca3af; font-size: 13px; margin: 0; }

/* Itemised table */
.ctt-act-items-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ctt-act-items-table th { background: #f9fafb; color: #374151; padding: 7px 10px; text-align: left; border-bottom: 2px solid #e5e7eb; font-weight: 600; }
.ctt-act-items-table th:not(:first-child) { text-align: right; }
.ctt-act-items-table td { padding: 7px 10px; border-bottom: 1px solid #f3f4f6; color: #374151; }
.ctt-act-items-table tr:last-child td { border-bottom: none; }
.ctt-act-items-table tfoot td { background: #f9fafb; border-top: 2px solid #e5e7eb; border-bottom: none; padding-top: 9px; padding-bottom: 9px; }
.ctt-act-num { text-align: right; }
.ctt-act-item-total { color: #c2410c; font-weight: 600; }

/* Activity toolbar (Add Activity button) */
.ctt-act-toolbar { margin-bottom: 16px; }

/* Edit / Delete buttons inside activity body */
.ctt-act-body-actions { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.ctt-act-edit-btn   { font-size: 12px; padding: 4px 14px; background: #1d4ed8; }
.ctt-act-edit-btn:hover { background: #1e40af; }
.ctt-fe-btn-danger  { background: #dc2626 !important; }
.ctt-fe-btn-danger:hover { background: #b91c1c !important; }

/* Activity modal (wider than default) */
.ctt-act-modal-box { width: 640px; max-height: calc(100vh - 40px); overflow-y: auto; }
.ctt-act-modal-box h2 { margin: 0 0 20px; color: #047857; font-size: 1.15em; font-weight: 700; border-bottom: 2px solid #d1fae5; padding-bottom: 12px; }
.ctt-modal-row textarea { width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; color: #111827; background: #fff; outline: none; resize: vertical; font-family: inherit; transition: border-color .15s; }
.ctt-modal-row textarea:focus { border-color: #059669; box-shadow: 0 0 0 3px rgba(5,150,105,.12); }

/* Line items grid inside modal — desktop */
.ctt-act-item-header,
.ctt-act-item-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 28px; gap: 6px; align-items: center; margin-bottom: 4px; }
.ctt-act-item-header { font-size: 11px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.ctt-act-item-row input { padding: 7px 8px; border: 1px solid #d1d5db; border-radius: 5px; font-size: 13px; width: 100%; box-sizing: border-box; outline: none; transition: border-color .15s; }
.ctt-act-item-row input:focus { border-color: #059669; box-shadow: 0 0 0 2px rgba(5,150,105,.1); }
.ctt-act-item-row input[readonly] { background: #f9fafb; color: #6b7280; }
.ctt-act-remove-item { background: none; border: none; color: #dc2626; font-size: 18px; cursor: pointer; padding: 0; line-height: 1; justify-self: center; }
.ctt-act-remove-item:hover { color: #991b1b; }
.ctt-act-add-item-btn { display: inline-block; margin-top: 8px; padding: 5px 14px; border: 1px dashed #059669; border-radius: 5px; background: #f0fdf4; color: #047857; font-size: 13px; font-weight: 500; cursor: pointer; transition: background .15s; }
.ctt-act-add-item-btn:hover { background: #d1fae5; }

/* Line items — tablet/mobile: stack item-name above the numeric fields */
@media (max-width: 520px) {
	.ctt-act-item-header { display: none; }
	.ctt-act-item-row {
		grid-template-columns: 1fr 1fr 1fr 28px;
		grid-template-rows: auto auto;
		gap: 4px;
		padding-bottom: 10px;
		border-bottom: 1px solid #e5e7eb;
		margin-bottom: 8px;
	}
	.ctt-item-name  { grid-column: 1 / span 4; grid-row: 1; }
	.ctt-item-qty   { grid-column: 1; grid-row: 2; }
	.ctt-item-ucost { grid-column: 2; grid-row: 2; }
	.ctt-item-total { grid-column: 3; grid-row: 2; }
	.ctt-act-remove-item { grid-column: 4; grid-row: 2; }
}

/* Activity modal — mobile: slide up from bottom */
@media (max-width: 640px) {
	#ctt-act-modal {
		align-items: flex-end;
	}
	#ctt-act-modal .ctt-act-modal-box {
		width: 100%;
		max-width: 100%;
		max-height: 92vh;
		border-radius: 18px 18px 0 0;
		animation: cttActSlideUp 0.32s cubic-bezier(0.32, 0.72, 0, 1) both;
	}
	@keyframes cttActSlideUp {
		from { transform: translateY(100%); }
		to   { transform: translateY(0); }
	}
	.ctt-act-modal-box { padding: 24px 20px 32px; }
}


/* Frontend action button in member table */
.ctt-fe-btn { display:inline-block; padding:5px 16px; border-radius:4px; background:#059669; color:#fff !important; border:none; cursor:pointer; font-size:12px; font-weight:500; line-height:1.6; text-decoration:none; }
.ctt-fe-btn:hover { background:#047857; color:#fff !important; }

/* ---- Update Contribution Modal (frontend) ---- */
.ctt-modal { position:fixed !important; inset:0; z-index:99999; display:flex; align-items:center; justify-content:center; }
.ctt-modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.55); }
.ctt-modal-box {
	position:relative;
	z-index:1;
	background:#fff;
	border-radius:12px;
	box-shadow:0 20px 60px rgba(0,0,0,.25);
	padding:32px;
	width:440px;
	max-width:calc(100vw - 32px);
	font-family:inherit;
}
.ctt-modal-box h2 { margin:0 0 24px; color:#047857; font-size:1.2em; font-weight:700; border-bottom:2px solid #d1fae5; padding-bottom:14px; }
.ctt-modal-row { display:flex; flex-direction:column; gap:5px; margin-bottom:16px; }
.ctt-modal-row label { font-weight:600; font-size:13px; color:#374151; text-transform:uppercase; letter-spacing:.04em; }
.ctt-modal-row input, .ctt-modal-row select { width:100%; box-sizing:border-box; padding:9px 12px; border:1px solid #d1d5db; border-radius:6px; font-size:15px; color:#111827; background:#fff; outline:none; transition:border-color .15s; }
.ctt-modal-row input:focus, .ctt-modal-row select:focus { border-color:#059669; box-shadow:0 0 0 3px rgba(5,150,105,.12); }
.ctt-modal-actions { margin-top:24px; display:flex; gap:10px; }
.ctt-modal-actions .ctt-btn { flex:1; padding:10px; font-size:15px; border-radius:6px; text-align:center; }
.ctt-fe-btn-cancel { flex:1; padding:10px; border-radius:6px; background:#fff; color:#374151; border:1px solid #d1d5db; cursor:pointer; font-size:15px; font-weight:500; text-align:center; }
.ctt-fe-btn-cancel:hover { background:#f3f4f6; }
.ctt-fe-error { background:#fee2e2; border:1px solid #fca5a5; border-radius:6px; padding:10px 14px; color:#991b1b; font-size:14px; margin-bottom:4px; margin-top:12px; }

/* Logged-in member highlights */
.ctt-my-status {
	background: #f0fdf4;
	border: 1px solid #a7f3d0;
	border-radius: 10px;
	padding: 18px 20px;
	margin-bottom: 20px;
}
.ctt-my-status-pending { background: #fffbeb; border-color: #fcd34d; }
.ctt-my-status-opted-out { background: #fef2f2; border-color: #fca5a5; }
.ctt-my-status-opted-out .ctt-my-status-header h3 { color: #991b1b; }
.ctt-my-status-header { display:flex; align-items:center; gap:10px; margin-bottom:4px; }
.ctt-my-status h3 { margin: 0; color: #047857; font-size: 1em; }
.ctt-my-status-pending .ctt-my-status-header h3 { color: #92400e; }
.ctt-my-status-hint { margin: 4px 0 14px; color: #78716c; font-size: 13px; }
.ctt-my-amount { margin:8px 0 0; font-size:1.1em; font-weight:600; color:#111827; }

/* Self-update form (pending contribution) */
.ctt-self-form { display:flex; flex-direction:column; gap:10px; }
.ctt-self-display-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.ctt-self-amount-display { font-size:1.15em; font-weight:700; color:#92400e; }
.ctt-self-amount-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
#ctt-edit-amount-btn { background:none; border:none; padding:0; color:#b45309; font-size:13px; font-weight:500; text-decoration:underline; cursor:pointer; }
#ctt-edit-amount-btn:hover { color:#92400e; }
.ctt-self-input { padding:8px 12px; border:1px solid #d97706; border-radius:6px; font-size:15px; width:130px; outline:none; }
.ctt-self-input:focus { border-color:#b45309; box-shadow:0 0 0 3px rgba(217,119,6,.15); }
.ctt-self-save-btn { padding:8px 20px; font-size:14px; border-radius:6px; }
.ctt-opt-out-btn { align-self:flex-start; padding:7px 18px; border-radius:6px; background:#fff; color:#b91c1c; border:1px solid #fca5a5; cursor:pointer; font-size:13px; font-weight:500; transition:background .15s; }
.ctt-opt-out-btn:hover { background:#fee2e2; }

/* Overdue contributions box */
.ctt-overdue-box {
	display:flex;
	gap:14px;
	align-items:flex-start;
	background:#fef2f2;
	border:1px solid #fca5a5;
	border-left:4px solid #ef4444;
	border-radius:10px;
	padding:16px 20px;
	margin-bottom:20px;
	color:#7f1d1d;
}
.ctt-overdue-icon { font-size:22px; line-height:1; flex-shrink:0; margin-top:2px; }
.ctt-overdue-box strong { display:block; font-size:1em; margin-bottom:4px; }
.ctt-overdue-box p { margin:4px 0; font-size:13px; }
.ctt-overdue-list { margin:6px 0 6px 18px; padding:0; font-size:13px; }
.ctt-overdue-list li { margin-bottom:2px; display:flex; justify-content:space-between; gap:16px; }
.ctt-overdue-amount { font-weight:600; }
.ctt-overdue-total { margin:8px 0 4px; font-weight:700; font-size:14px; border-top:1px solid #fca5a5; padding-top:6px; }

.ctt-fe-table tr.ctt-my-row { background: #f0fdf4; font-weight: 600; }
.ctt-you-label { color: #059669; font-size: 12px; margin-left: 6px; font-weight: normal; }

/* ---- Profile picture ---- */
.ctt-profile-picture-wrap {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 20px;
	padding: 16px 20px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
}
/* Avatar wrapper: holds the circle + camera overlay */
.ctt-profile-avatar-wrap {
	position: relative;
	flex-shrink: 0;
	width: 80px;
	height: 80px;
}
.ctt-profile-picture-avatar {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	overflow: hidden;
	background: #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ctt-profile-pic {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 50%;
	display: block;
}
.ctt-profile-pic-placeholder {
	font-size: 30px;
	font-weight: 700;
	color: #64748b;
	line-height: 1;
	user-select: none;
}
/* Camera overlay – hidden until hover */
.ctt-profile-cam-overlay {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0);
	cursor: pointer;
	transition: background 0.18s;
}
.ctt-profile-avatar-wrap:hover .ctt-profile-cam-overlay {
	background: rgba(0, 0, 0, 0.42);
}
.ctt-cam-icon {
	width: 28px;
	height: 28px;
	color: #fff;
	opacity: 0;
	transition: opacity 0.18s;
	pointer-events: none;
}
.ctt-profile-avatar-wrap:hover .ctt-cam-icon { opacity: 1; }
/* Info column */
.ctt-profile-picture-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.ctt-profile-name {
	font-weight: 700;
	font-size: 16px;
	color: #1e293b;
}
.ctt-profile-contact {
	font-size: 13px;
	color: #64748b;
}
.ctt-profile-pic-status { font-size: 12px; margin-top: 2px; }
.ctt-profile-pic-status.ctt-pic-error { color: #dc2626; }
.ctt-profile-pic-status.ctt-pic-ok    { color: #16a34a; }
/* Member table: avatar + name cell */
.ctt-member-cell {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
    font-weight: 600;
}
.ctt-member-cell span { display: flex; flex-direction: column; gap: 2px; }
.ctt-member-status-inline { line-height: 1; width: fit-content; }
.ctt-member-thumb {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	display: block;
}
.ctt-member-initial {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #e2e8f0;
	color: #64748b;
	font-weight: 700;
	font-size: 13px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

/* ---- Member List Cards ---- */
.ctt-member-list-title { color: #047857; font-size: 1.3em; margin: 0 0 20px; }
.ctt-ml-search-wrap { margin-bottom: 18px; }
.ctt-ml-search {
	width: 100%;
	max-width: 360px;
	padding: 8px 14px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 0.95em;
	box-sizing: border-box;
}
.ctt-ml-search:focus { outline: none; border-color: #059669; box-shadow: 0 0 0 2px #d1fae5; }
.ctt-ml-no-results { color: #6b7280; font-style: italic; }
.ctt-member-cards {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
gap: 16px;
margin-bottom: 24px;
}
.ctt-member-card {
background: #fff;
border: 1px solid #e5e7eb;
border-radius: 14px;
padding: 24px 16px 18px;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
box-shadow: 0 1px 4px rgba(0,0,0,.06);
transition: box-shadow .15s, transform .15s;
position: relative;
}
.ctt-member-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.10); transform: translateY(-2px); }

/* Avatar */
.ctt-mc-avatar {
width: 76px;
height: 76px;
border-radius: 50%;
overflow: hidden;
background: #e2e8f0;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 14px;
flex-shrink: 0;
border: 3px solid #f0fdf4;
box-shadow: 0 0 0 2px #a7f3d0;
}
.ctt-mc-pic {
width: 76px;
height: 76px;
object-fit: cover;
border-radius: 50%;
display: block;
}
.ctt-mc-initial {
font-size: 28px;
font-weight: 700;
color: #64748b;
user-select: none;
line-height: 1;
}

/* Body */
.ctt-mc-body {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 5px;
width: 100%;
}
.ctt-mc-name {
font-weight: 700;
font-size: 15px;
color: #111827;
line-height: 1.3;
word-break: break-word;
}
.ctt-mc-since {
font-size: 11px;
color: #9ca3af;
}
.ctt-mc-status { margin-top: 4px; position: absolute;  top: 0;  left: 4px; }

/* Edit button */
.ctt-mc-edit-btn {
margin-top: 6px;
width: 100%;
padding: 7px 0;
border-radius: 8px;
background: #f0fdf4;
color: #047857;
border: 1px solid #a7f3d0;
cursor: pointer;
font-size: 12px;
font-weight: 600;
letter-spacing: .02em;
transition: background .15s, border-color .15s;
}
.ctt-mc-edit-btn:hover { background: #d1fae5; border-color: #6ee7b7; }

/* ---- Edit Member modal: photo row ---- */
.ctt-mem-photo-row {
display: flex;
align-items: center;
gap: 14px;
margin-bottom: 18px;
padding-bottom: 16px;
border-bottom: 1px solid #f3f4f6;
}
.ctt-mem-modal-avatar-wrap {
position: relative;
flex-shrink: 0;
width: 72px;
height: 72px;
border-radius: 50%;
overflow: visible;
}
.ctt-mem-modal-avatar {
width: 72px;
height: 72px;
border-radius: 50%;
overflow: hidden;
background: #e2e8f0;
display: flex;
align-items: center;
justify-content: center;
border: 2px solid #a7f3d0;
}
.ctt-mem-modal-avatar img {
width: 72px;
height: 72px;
object-fit: cover;
border-radius: 50%;
display: block;
}
.ctt-mem-cam-overlay {
position: absolute;
inset: 0;
border-radius: 50%;
background: rgba(0,0,0,0);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background 0.18s;
}
.ctt-mem-cam-overlay svg {
color: #fff;
opacity: 0;
transition: opacity 0.18s;
pointer-events: none;
}
.ctt-mem-modal-avatar-wrap:hover .ctt-mem-cam-overlay { background: rgba(0,0,0,0.42); }
.ctt-mem-modal-avatar-wrap:hover .ctt-mem-cam-overlay svg { opacity: 1; }

/* ---- Member Status: header with view toggle ---- */
.ctt-ms-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
flex-wrap: wrap;
gap: 8px;
}
.ctt-ms-title { margin: 0; font-size: 1em; color: #047857; }

.ctt-view-toggle {
display: flex;
gap: 2px;
background: #f3f4f6;
border-radius: 8px;
padding: 3px;
}
.ctt-view-btn {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border-radius: 6px;
border: none;
background: transparent;
color: #9ca3af;
cursor: pointer;
transition: background .15s, color .15s;
}
.ctt-view-btn:hover { background: #e5e7eb; color: #374151; }
.ctt-view-btn-active { background: #fff !important; color: #047857 !important; box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* ---- Member Status: card grid ---- */
.ctt-ms-cards {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
gap: 12px;
margin-bottom: 4px;
}
.ctt-ms-card {
background: #fff;
border: 1px solid #e5e7eb;
border-radius: 12px;
padding: 16px 12px 14px;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
box-shadow: 0 1px 3px rgba(0,0,0,.05);
transition: box-shadow .15s, transform .15s;
}
.ctt-ms-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.09); transform: translateY(-1px); }
.ctt-ms-card-me { border-color: #6ee7b7; background: #f0fdf4; }

.ctt-ms-card-avatar {
width: 54px;
height: 54px;
border-radius: 50%;
overflow: hidden;
background: #e2e8f0;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 10px;
border: 2px solid #d1fae5;
}
.ctt-ms-card-pic {
width: 54px;
height: 54px;
object-fit: cover;
border-radius: 50%;
display: block;
}
.ctt-ms-card-initial {
font-size: 20px;
font-weight: 700;
color: #64748b;
line-height: 1;
}
.ctt-ms-card-name {
font-size: 13px;
font-weight: 600;
color: #111827;
line-height: 1.3;
word-break: break-word;
margin-bottom: 5px;
}
.ctt-ms-card-status { margin-bottom: 4px; }
.ctt-ms-card-amount {
font-size: 12px;
font-weight: 600;
color: #374151;
margin-bottom: 6px;
}
.ctt-ms-card-update-btn {
margin-top: 6px;
width: 100%;
padding: 5px 0;
border-radius: 6px;
background: #f0fdf4;
color: #047857;
border: 1px solid #a7f3d0;
cursor: pointer;
font-size: 11px;
font-weight: 600;
transition: background .15s;
}
.ctt-ms-card-update-btn:hover { background: #d1fae5; }
