.user-management {
  margin: 28px 0 34px;
  padding: 22px;
  border: 1px solid #dfe8e1;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fbf8, #fff);
}
.user-management-heading { display: flex; justify-content: space-between; margin-bottom: 20px; }
.user-management-heading h3 { margin: 3px 0 0; }
.user-management-eyebrow, .private-message-eyebrow { margin: 0; color: #07883f; font-size: 11px; font-weight: 750; letter-spacing: .14em; }
.user-management-grid { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(240px, 1fr) minmax(240px, 1.2fr); gap: 14px; }
.user-panel { min-width: 0; padding: 17px; border: 1px solid #e2e9e3; border-radius: 14px; background: #fff; }
.user-panel h4 { margin: 0 0 14px; font-size: 14px; }
.member-list { display: grid; gap: 7px; }
.member-item { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 9px; width: 100%; padding: 9px; border: 1px solid transparent; border-radius: 10px; color: #27322c; background: #f6f9f6; text-align: left; font: inherit; cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease; }
.member-item:hover, .member-item:focus-visible { border-color: #93c9a7; background: #edf8f0; transform: translateX(2px); }
.member-item.is-selected { border-color: #07883f; background: #e9f7ed; }
.member-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; background: #07883f; font-size: 12px; font-weight: 700; }
.member-arrow { color: #07883f; transition: transform 160ms ease; }
.member-item:hover .member-arrow, .member-item:focus-visible .member-arrow { transform: translateX(3px); }
.member-summary { display: grid; justify-items: start; gap: 4px; min-width: 0; }
.member-name { max-width: 100%; overflow-wrap: anywhere; }
.member-status { padding: 2px 7px; border-radius: 20px; color: #076b33; background: #def3e5; font-size: 11px; }
.member-status.is-blocked { color: #9c2929; background: #fce8e8; }
.member-create-panel { margin-bottom: 14px; }
.member-create-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; }
.member-create-form .field-hint, .member-create-form .user-form-status { grid-column: 1 / -1; }
.member-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.member-actions button { flex: 1 1 120px; }
.member-actions .member-delete { color: #a42b2b; border-color: #e5baba; }
.user-management button:disabled { cursor: wait; opacity: .6; }
.member-actions button:focus-visible, .member-create-form button:focus-visible { outline: 3px solid #9addb2; outline-offset: 2px; }
.member-form { display: grid; gap: 12px; }
.member-form label { display: grid; gap: 6px; color: #4b574f; font-size: 12px; font-weight: 650; }
.member-form input, .member-form textarea { box-sizing: border-box; width: 100%; padding: 10px 11px; border: 1px solid #dce5de; border-radius: 9px; color: #202923; background: #fff; font: inherit; resize: vertical; }
.member-form input:focus-visible, .member-form textarea:focus-visible, .member-item:focus-visible { outline: 3px solid #9addb2; outline-offset: 2px; }
.field-hint { margin: -3px 0 0; color: #68746c; font-size: 11px; line-height: 1.5; }
.user-form-status { min-height: 18px; margin: 0; color: #07883f; font-size: 12px; }
.user-form-status.is-error { color: #a42b2b; }
.morph-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.morph-icon { position: relative; display: inline-block; width: 14px; height: 14px; }
.morph-save::before { content: ""; position: absolute; inset: 1px 2px 2px; border: 2px solid currentColor; border-radius: 3px; }
.morph-save::after { content: ""; position: absolute; left: 5px; top: 3px; width: 4px; height: 4px; border: 1px solid currentColor; border-radius: 1px; }
.morph-send::before { content: ""; position: absolute; left: 1px; top: 4px; width: 11px; height: 7px; border-top: 2px solid currentColor; transform: rotate(-28deg); }
.morph-send::after { content: ""; position: absolute; right: 1px; top: 1px; width: 7px; height: 7px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(18deg); }
.message-history-panel { margin-top: 14px; }
.message-history { display: grid; gap: 9px; }
.message-history-item { padding: 12px; border: 1px solid #e7ece8; border-radius: 10px; background: #fbfdfb; }
.message-history-item > div { display: flex; justify-content: space-between; gap: 12px; }
.message-history-item span, .message-history-item small { color: #68746c; font-size: 11px; }
.message-history-item p { margin: 8px 0; color: #455149; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
.private-message-dialog { box-sizing: border-box; width: min(720px, calc(100vw - 28px)); max-height: calc(100dvh - 30px); padding: 0; border: 0; border-radius: 20px; color: #202923; background: #fff; box-shadow: 0 28px 100px #17251e40; }
.private-message-dialog::backdrop { background: #17251e73; backdrop-filter: blur(6px); }
.private-message-form { position: relative; padding: clamp(24px, 5vw, 54px); }
.private-message-close { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.private-message-close::before, .private-message-close::after { content: ""; position: absolute; left: 10px; top: 16px; width: 14px; height: 2px; background: currentColor; }
.private-message-close::before { transform: rotate(45deg); } .private-message-close::after { transform: rotate(-45deg); }
.private-message-close:hover, .private-message-close:focus-visible { color: #07883f; background: #edf8f0; }
.private-message-title { max-width: 600px; margin: 12px 0 8px; font-size: clamp(25px, 5vw, 38px); line-height: 1.18; overflow-wrap: anywhere; }
.private-message-date { margin: 0 0 28px; color: #758078; font-size: 12px; }
.private-message-body { max-height: min(52vh, 520px); overflow: auto; padding-right: 4px; color: #354039; font-size: 16px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.private-message-error { margin: 16px 0 0; color: #a42b2b; font-size: 13px; line-height: 1.6; }
.private-message-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.private-message-close:focus-visible, .private-message-dialog button:focus-visible { outline: 3px solid #9addb2; outline-offset: 3px; }
@media (max-width: 820px) { .user-management-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .user-management { padding: 15px; } .user-panel { padding: 13px; } .member-create-form { grid-template-columns: minmax(0, 1fr); } .user-management button { min-height: 44px; white-space: normal; overflow-wrap: anywhere; } .private-message-actions button { flex: 1 1 140px; } }
@media (prefers-reduced-motion: reduce) { .member-item, .member-arrow { transition: none; } }

/* Scoped owner workspace theme. Keep the public site and private message dialog unchanged. */
#adminPanel {
  --admin-green: #07a951;
  --admin-green-strong: #07883f;
  --admin-green-soft: #edf8f0;
  --admin-ink: #202923;
  --admin-muted: #68746c;
  --admin-line: #e0e8e2;
  --admin-bg: #f4f7f5;
  box-sizing: border-box;
  margin-top: 22px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid #dfe8e1;
  border-radius: 18px;
  color: var(--admin-ink);
  background: var(--admin-bg);
  box-shadow: 0 16px 42px #17251e0d;
}
#adminPanel > h3 {
  margin: 0;
  color: var(--admin-ink);
  font-size: clamp(21px, 3vw, 28px);
  line-height: 1.3;
}
#adminPanel > h3 + .muted { margin: 7px 0 24px; }
#adminPanel .admin-workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: -2px 0 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--admin-line);
}
#adminPanel .admin-workspace-copy { min-width: 0; }
#adminPanel .admin-workspace-header h3,
#adminPanel .admin-workspace-header h4 { margin: 0; color: var(--admin-ink); }
#adminPanel .admin-workspace-header p { margin: 7px 0 0; color: var(--admin-muted); font-size: 13px; line-height: 1.6; }
#adminPanel .admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 22px;
  padding: 5px;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: #eaf1ec;
}
#adminPanel .admin-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 10px;
  color: #526158;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
#adminPanel .admin-nav a:hover,
#adminPanel .admin-nav a:focus-visible,
#adminPanel .admin-nav a[aria-current="true"] {
  color: var(--admin-green-strong);
  background: #fff;
  box-shadow: 0 2px 8px #17251e12;
}
#adminPanel .admin-nav a:active { transform: translateY(1px); }
#adminPanel .admin-card {
  min-width: 0;
  margin: 0 0 16px;
  padding: clamp(16px, 2.5vw, 22px);
  border: 1px solid var(--admin-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px #17251e08;
}
#adminPanel .admin-card:last-child { margin-bottom: 0; }
#adminPanel .admin-card > h4,
#adminPanel .admin-section-heading h4 {
  margin: 0;
  color: var(--admin-ink);
  font-size: 16px;
  line-height: 1.45;
}
#adminPanel .admin-section-heading { margin-bottom: 16px; }
#adminPanel .admin-section-heading p { margin: 5px 0 0; color: var(--admin-muted); font-size: 13px; line-height: 1.65; }
#adminPanel .admin-feedback,
#adminPanel .admin-card .muted[role="status"] {
  display: block;
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.55;
}
#adminPanel .admin-feedback.is-success { color: var(--admin-green-strong); }
#adminPanel .admin-feedback.is-error,
#adminPanel .admin-card .user-form-status.is-error { color: #a42b2b; }
#adminPanel .admin-field,
#adminPanel .form > label,
#adminPanel .member-form label {
  display: grid;
  gap: 7px;
  color: #4b574f;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}
#adminPanel input:not([type="checkbox"]):not([type="radio"]),
#adminPanel textarea,
#adminPanel select,
#adminPanel .admin-field input,
#adminPanel .admin-field textarea,
#adminPanel .admin-field select {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #d7e2da;
  border-radius: 10px;
  color: var(--admin-ink);
  background: #fff;
  font: inherit;
  line-height: 1.4;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}
#adminPanel textarea { min-height: 110px; resize: vertical; }
#adminPanel input::placeholder,
#adminPanel textarea::placeholder { color: #9aa59e; }
#adminPanel input:focus-visible,
#adminPanel textarea:focus-visible,
#adminPanel select:focus-visible,
#adminPanel .admin-nav a:focus-visible,
#adminPanel button:focus-visible,
#adminPanel .admin-field:focus-within { outline: 3px solid #9addb280; outline-offset: 2px; }
#adminPanel input:focus,
#adminPanel textarea:focus,
#adminPanel select:focus { border-color: #70c68d; box-shadow: 0 0 0 3px #9addb233; }
#adminPanel button,
#adminPanel .outline,
#adminPanel .primary,
#adminPanel .admin-actions button,
#adminPanel .admin-actions .button {
  min-height: 40px;
  border-radius: 10px;
  padding: 9px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
#adminPanel button:active:not(:disabled) { transform: translateY(1px); }
#adminPanel .primary,
#adminPanel .admin-actions .primary { border: 1px solid var(--admin-green); background: var(--admin-green); color: #fff; }
#adminPanel .primary:hover:not(:disabled),
#adminPanel .admin-actions .primary:hover:not(:disabled) { background: #069a4a; box-shadow: 0 4px 12px #07a9512e; }
#adminPanel .outline,
#adminPanel .admin-actions .outline,
#adminPanel .admin-actions .button { border: 1px solid #cbd9ce; background: #fff; color: #3f4e44; }
#adminPanel .outline:hover:not(:disabled),
#adminPanel .admin-actions .outline:hover:not(:disabled),
#adminPanel .admin-actions .button:hover:not(:disabled) { border-color: #83c79a; color: var(--admin-green-strong); background: var(--admin-green-soft); }
#adminPanel .admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}
#adminPanel .admin-actions > :first-child:not(button):not(.button) { margin-right: auto; }
#adminPanel .admin-actions .danger,
#adminPanel .member-actions .member-delete,
#adminPanel button[data-danger="true"] { border-color: #e3baba; color: #a42b2b; background: #fff; }
#adminPanel .admin-actions .danger:hover:not(:disabled),
#adminPanel .member-actions .member-delete:hover:not(:disabled),
#adminPanel button[data-danger="true"]:hover:not(:disabled) { border-color: #cf8989; background: #fff4f4; }
#adminPanel button:disabled,
#adminPanel button[aria-busy="true"] { cursor: wait; opacity: .62; }
#adminPanel [aria-busy="true"] { position: relative; }
#adminPanel button[aria-busy="true"]::after { position: static; display: inline-block; transform: none; width: 12px; height: 12px; margin-left: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; content: ""; vertical-align: -2px; animation: admin-spin .7s linear infinite; }
#adminPanel .admin-card .form,
#adminPanel .admin-card .member-form { gap: 13px; }
#adminPanel .admin-card .formrow { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
#adminPanel .admin-card .formrow > * { min-width: 0; }
#adminPanel .manage-list { gap: 9px; margin: 14px 0 0; }
#adminPanel .manage-row {
  align-items: flex-start;
  flex-wrap: wrap;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid #e0e8e2;
  border-radius: 11px;
  background: #fbfdfb;
}
#adminPanel .manage-row > * { min-width: 0; overflow-wrap: anywhere; }
#adminPanel .manage-row button { flex: 0 0 auto; }
#adminPanel .user-management.admin-card { margin: 0 0 16px; }
#adminPanel .user-management.admin-card .user-management-heading { margin-bottom: 16px; }
#adminPanel .user-management.admin-card .user-panel { border-radius: 12px; background: #fbfdfb; }
#adminPanel .user-management.admin-card .member-form input,
#adminPanel .user-management.admin-card .member-form textarea { min-height: 40px; }
@keyframes admin-spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) {
  #adminPanel { padding: 16px; }
  #adminPanel .admin-workspace-header { flex-direction: column; }
  #adminPanel .admin-workspace-header > button { width: 100%; }
  #adminPanel .admin-nav { gap: 5px; }
  #adminPanel .admin-nav a { flex: 1 1 120px; justify-content: center; }
  #adminPanel .admin-actions { align-items: stretch; justify-content: stretch; }
  #adminPanel .admin-actions > :first-child:not(button):not(.button) { flex-basis: 100%; margin-right: 0; }
  #adminPanel .admin-actions button,
  #adminPanel .admin-actions .button { flex: 1 1 130px; }
  #adminPanel .manage-row { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  #adminPanel .admin-nav a,
  #adminPanel input,
  #adminPanel textarea,
  #adminPanel select,
  #adminPanel button { transition: none; }
  #adminPanel button[aria-busy="true"]::after { animation: none; }
}
