.nightmarket-admin-dialog {
  width: min(800px, calc(100vw - 32px));
  max-width: 800px;
  max-height: calc(100vh - 32px);
}

.nightmarket-admin-content { width: 100%; }

.nightmarket-admin-subtitle {
  max-width: 580px;
  margin: 4px 36px 0 0;
  color: var(--text-secondary, #687182);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.nightmarket-admin-body { display: grid; gap: 24px; padding: 20px; }

.nightmarket-admin-provision {
  padding: 16px;
  border: 1px solid var(--border, #d9dde3);
  border-radius: 10px;
  background: var(--bg-secondary, #f6f8fa);
}

.nightmarket-admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.nightmarket-admin-section-header h4 { margin: 0; }
.nightmarket-admin-section-header span,
.nightmarket-admin-hint {
  color: var(--text-secondary, #687182);
  font-size: 12px;
  line-height: 1.5;
}

.nightmarket-admin-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.nightmarket-admin-form label { display: grid; gap: 6px; min-width: 0; }
.nightmarket-admin-form label span { color: var(--text-secondary, #687182); font-size: 12px; font-weight: 600; }
.nightmarket-admin-form input { width: 100%; min-width: 0; }
.nightmarket-admin-hint { margin: 12px 0 0; }

.nightmarket-admin-message {
  margin: 0 20px;
  padding: 10px 12px;
  border-left: 3px solid #0f8a62;
  background: #edf8f2;
  color: #19633d;
  font-size: 13px;
}

.nightmarket-admin-message.is-error { border-left-color: #c2413b; background: #fff1f0; color: #9f2f2a; }
.nightmarket-admin-store-list { display: grid; gap: 8px; }

.nightmarket-admin-store {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  border: 1px solid var(--border, #d9dde3);
  border-radius: 9px;
}

.nightmarket-admin-store-main { min-width: 0; display: grid; gap: 8px; flex: 1; }
.nightmarket-admin-store-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nightmarket-admin-store-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nightmarket-admin-store-meta { color: var(--text-secondary, #687182); font-size: 12px; overflow-wrap: anywhere; }
.nightmarket-admin-store-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.nightmarket-admin-status { padding: 3px 8px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.nightmarket-admin-status.is-enabled { background: #edf8f2; color: #19633d; }
.nightmarket-admin-status.is-disabled { background: #f2f3f5; color: #596273; }
.nightmarket-admin-member-count { color: var(--text-secondary, #687182); font-size: 12px; white-space: nowrap; }
.nightmarket-admin-member-section { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--border, #d9dde3); border-radius: 8px; background: var(--bg-secondary, #f6f8fa); }
.nightmarket-admin-member-title { color: var(--text-secondary, #687182); font-size: 12px; font-weight: 600; }
.nightmarket-admin-members { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.nightmarket-admin-member { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 8px; border-radius: 6px; background: var(--bg-primary, #fff); }
.nightmarket-admin-member-identity { min-width: 0; display: grid; gap: 2px; }
.nightmarket-admin-member-user { overflow-wrap: anywhere; color: var(--text-primary, #1f2937); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; }
.nightmarket-admin-member-joined { color: var(--text-secondary, #687182); font-size: 11px; }
.nightmarket-admin-member-state { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.nightmarket-admin-role-editor select { min-width: 74px; padding: 4px 24px 4px 8px; font-size: 11px; }
.nightmarket-admin-role,
.nightmarket-admin-member-active { padding: 2px 7px; border-radius: 999px; font-size: 11px; white-space: nowrap; }
.nightmarket-admin-role.is-owner { background: #e7f0ff; color: #1a5fb4; }
.nightmarket-admin-role.is-staff { background: #f2f3f5; color: #596273; }
.nightmarket-admin-member-active.is-active { background: #edf8f2; color: #19633d; }
.nightmarket-admin-member-active.is-inactive { background: #fff1f0; color: #9f2f2a; }
.nightmarket-admin-member-identity-status { display: inline-flex; width: fit-content; padding: 2px 7px; border-radius: 999px; font-size: 11px; }
.nightmarket-admin-member-identity-status.is-pending { background: #fff4d8; color: #8a5b00; }
.nightmarket-admin-member-identity-status.is-bound { background: #edf8f2; color: #19633d; }
.nightmarket-admin-member-remove { border-color: #c2413b; color: #b33731; }
.nightmarket-admin-member-remove:hover { background: #fff1f0; }
.nightmarket-admin-member-empty { margin: 0; color: var(--text-secondary, #687182); font-size: 12px; }
.nightmarket-admin-member-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--border, #d9dde3);
}
.nightmarket-admin-member-form label { display: grid; gap: 4px; min-width: 0; }
.nightmarket-admin-member-form label span,
.nightmarket-admin-member-hint { color: var(--text-secondary, #687182); font-size: 11px; line-height: 1.45; }
.nightmarket-admin-member-form input { width: 100%; min-width: 0; }
.nightmarket-admin-empty { padding: 24px 8px; color: var(--text-secondary, #687182); text-align: center; }
.nightmarket-admin-delete { border-color: #c2413b; color: #b33731; }
.nightmarket-admin-delete:hover { background: #fff1f0; }

@media (max-width: 720px) {
  .nightmarket-admin-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .nightmarket-admin-body { padding: 14px; }
  .nightmarket-admin-form { grid-template-columns: 1fr; }
  .nightmarket-admin-form .btn-primary { width: 100%; }
  .nightmarket-admin-store { align-items: flex-start; flex-direction: column; }
  .nightmarket-admin-store-controls { justify-content: flex-start; }
  .nightmarket-admin-member { align-items: flex-start; flex-direction: column; }
  .nightmarket-admin-member-state { justify-content: flex-start; }
  .nightmarket-admin-member-form { grid-template-columns: 1fr; }
  .nightmarket-admin-member-form .btn-secondary { width: 100%; }
}
